3 ms·
Refcounting and a single threaded runtime, instead of GC and a multithreaded one. By compiled regexpes, I meant replacing things like bytes.Equal(foo, "qwe") w
by zzzcpan 12y ago
Refcounting and a single threaded runtime, instead of GC and a multithreaded one.
By compiled regexpes, I meant replacing things like bytes.Equal(foo, "qwe") with things like foo.m(`^qwe$`) or even foo.m/^qwe$/ that have the same performance. All the loops that scan through slices could benefit from it, golang has a lot of them. Plus more overall matching/scanning consistency, that should lead to fewer mistakes.
- vardump 12y agoWell, if you're happy to run them only over byte arrays, then you should be able to use PCRE and satisfy your performance requirements. Your regular expressions will get compiled into native code at runtime. http://sljit.sourceforge.net/pcre.html http://sljit.sourceforge.net/pcre.html
- theseoafs 12y agoGo would need to be completely rearchitected in order to move to a single-threaded runtime.