Closed aroben closed 9 years ago
And just to show that the speedup isn't only on large files:
CPython:
$ bundle exec ruby bench.rb 500
Benchmarking....
Size: 15523 bytes
Iterations: 500
user system total real
pygments popen 0.300000 0.120000 0.420000 ( 12.263667)
pygments popen (process already started) 0.280000 0.120000 0.400000 ( 12.045258)
pygments popen (process already started 2) 0.280000 0.120000 0.400000 ( 11.901942)
PyPy:
$ bundle exec ruby bench.rb 500
Benchmarking....
Size: 15523 bytes
Iterations: 500
user system total real
pygments popen 0.310000 0.130000 0.440000 ( 10.554289)
pygments popen (process already started) 0.300000 0.130000 0.430000 ( 8.539325)
pygments popen (process already started 2) 0.310000 0.120000 0.430000 ( 8.608728)
PyPy has a slower startup time than CPython, so this probably isn't an appropriate default. It would still be nice to support as an option though.
It's slower to launch than CPython, but around 30% faster once running.
CPython:
PyPy:
/cc @tmm1 @tnm