News for hackers. Stuff that matters.
Re:Ruby's Date/DateTime classes rewritten in C.. 20-200x per... by lsb on Monday August 23, 2010 @04:09PM (#1627878)
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...

Re:Ruby's Date/DateTime classes rewritten in C.. 20-200x per... by jrockway on Monday August 23, 2010 @04:18PM (#1627921)
Yeah, 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.