3 ms·
Alternately, if you use a high-level-language like Haskell that can compile into machine code, you can rewrite something like regexp matching (like regex-tdfa[1
by lsb 16y ago
Alternately, if you use a high-level-language like Haskell that can compile into machine code, you can rewrite something like regexp matching (like regex-tdfa[1]) and get better performance than what the stdlib gives you on some inputs.
[1] http://www.haskell.org/haskellwiki/Regular_expressions#regex-tdfa http://www.haskell.org/haskellwiki/Regular_expressions#regex...
- jrockway 16y agoYeah, exactly. I rarely have to call out to C in my Haskell applications. When I do, it's only to get or send data to a C library that I don't want to rewrite. Internally, things like Data.Vector work just like the C equivalent. The internal representation of the data is the same (i.e., Vector.Unboxed Double == a big block of memory with CDoubles in it), and the machine instructions that run on the data are the same. High-level languages need not be slow. It's just that Perl, Python, Ruby, and PHP are.