4 ms·
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
by gfasdgsfd 12y 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.
- arthurtw 12y agoI’ll try that later, though the Nim version is fast enough after using -d:release flag.