Hacker News new | ask | show | jobs
by gfasdgsfd 4174 days ago
I'd guess that pulling that try-catch out of the loop would make things go much faster. Nim doesn't use 0-overhead exceptions, so setjmp needs to be called each time the try-catch is entered.

You should also use the re module, PEGs is not nearly as optimized as PCRE.

1 comments

I’ll try that later, though the Nim version is fast enough after using -d:release flag.