Hi,
I wrote a parser using nom which was capable of parsing ~100 Mb/s of beancount syntax on my machine.
After introducing nom_locate by changing all input types from &str to LocatedSpan<&str> (you can look at the diff),
the parser performance has been halved, parsing only ~50 Mb/s of beancount syntax on the same machine.
It is no biggie. I was of course expecting a performance cost (as there is more work being done), and the performance is still largely acceptable (and still faster than pest). But, I was nevertheless surprised by the magnitude of the performance hit. I did not expect nom_locate to take half of the parsing time.
So, I am just asking, is what I observe expected? Have you observed a similar performance hit in your usages of nom_locate? Could it be that I am misusing nom_locate?
Again, this is not an issue. But as the "discussions" are disabled, I don't know how else to open a discussion on the subject.
Hi,
I wrote a parser using nom which was capable of parsing ~100 Mb/s of beancount syntax on my machine.
After introducing
nom_locateby changing all input types from&strtoLocatedSpan<&str>(you can look at the diff),the parser performance has been halved, parsing only ~50 Mb/s of beancount syntax on the same machine.
It is no biggie. I was of course expecting a performance cost (as there is more work being done), and the performance is still largely acceptable (and still faster than pest). But, I was nevertheless surprised by the magnitude of the performance hit. I did not expect
nom_locateto take half of the parsing time.So, I am just asking, is what I observe expected? Have you observed a similar performance hit in your usages of
nom_locate? Could it be that I am misusingnom_locate?Again, this is not an issue. But as the "discussions" are disabled, I don't know how else to open a discussion on the subject.