@HenrikLievonen@mastodon.hli.fi
Post #1765268
2026-04-27 09:09 UTC
Hmm... Maybe making the tail function copy the whole string into a new buffer in a functional programming language was not that good of an idea: even counting the length of a string is now a quadratic operation, let alone parsing any string. I guess I'll fix that in the original level-0 implementation so that my level-1 parser can actually become usable.
Replies (1)
-
@HenrikLievonen@mastodon.hli.fi 2026-04-28 19:51
This might not be the mainissue after all, as a new string implementation with logarithmic cost of all operations does not help. Apparently one needs to remember to benchmark and profile the code. It seems that currently my level-1 parser has cubic cost in the length of the input 🙃