3 ms·
I was browsing the language shootout the other day and came across the page for the regex test. I'm not sure how it's doing it or if something is wrong with the
by unfasten 16y ago
I was browsing the language shootout the other day and came across the page for the regex test. I'm not sure how it's doing it or if something is wrong with the test but V8 is outperforming everything else, including C. That's the only test it leads though.
Here are the results: http://shootout.alioth.debian.org/u32/performance.php?test=regexdna http://shootout.alioth.debian.org/u32/performance.php?test=r...
Also worth noting that TraceMonkey isn't too far behind. Does anyone know why the JS engines, especially V8, are performing so well on this test?
P.S. Here's how V8/TraceMonkey stack up for all the tests: http://shootout.alioth.debian.org/u32/which-programming-languages-are-fastest.php?calc=chart&gpp=on&java=on&ghc=on&csharp=on&sbcl=on&go=on&v8=on&hipe=on&tracemonkey=on&python=on&yarv=on&perl=on&php=on http://shootout.alioth.debian.org/u32/which-programming-lang...
- devinj 16y agoV8 JIT-compiles regular expressions. I don't know what C/C++ do -- I'd assume they run the state machine directly, but maybe they do compile it further like V8 does. http://blog.chromium.org/2009/02/irregexp-google-chromes-new-regexp.html http://blog.chromium.org/2009/02/irregexp-google-chromes-new...
- pdhborges 16y agoLook at the source code of the C program. It uses glib and the TCL libraries and it even includes locking for the multicore benchmark.
- igouy 16y agoLook at the source code of the other C regex-dna programs which don't use glib or Tcl libraries.
- igouy 16y agoSee the notes http://shootout.alioth.debian.org/u32/program.php?test=regexdna&lang=v8&id=2#about http://shootout.alioth.debian.org/u32/program.php?test=regex...