3 ms·
With the Racket core currently being re-written in Chez Scheme, how will this affect Pycket? Will regular Racket become fast enough to preclude using Pycket?
by eggy 8y ago
With the Racket core currently being re-written in Chez Scheme, how will this affect Pycket? Will regular Racket become fast enough to preclude using Pycket?
- ufo 8y agoOne of the things that the Pycket team has been trying to do is use JIT compilation to cut down on the runtime cost of Racket's contract system. This is not an area chez scheme would be able to compete with. I don't really know what is the current state of pycket other than that though.
- samth 8y agoPerformance varies a lot in Racket-on-Chez. For some programs, such as tight loops over simple data, Chez provides a lot of the same benefit as Pycket, but Pycket is often still faster. Here's a simple loop that sums numbers from 1 to 100000000, with timings for all three variants of Racket: [samth@huor:~/sw/plt (master) plt] pycket-c -t count.rkt cpu time: 83 real time: 83 gc time: 0 4999999950000000 [samth@huor:~/sw/plt (master) plt] racket -t count.rkt cpu time: 226 real time: 227 gc time: 0 4999999950000000 [samth@huor:~/sw/plt (master) plt] racketcs -t count.rkt cpu time: 170 real time: 174 gc time: 2 4999999950000000 Chez is faster than regular Racket, but not as fast as Pycket. However, other programs the difference is much bigger. If we use generic iteration instead of type-specializing it, we get these numbers: [samth@huor:~/sw/plt (master) plt] racket -t count.rkt cpu time: 2883 real time: 2882 gc time: 0 4999999950000000 [samth@huor:~/sw/plt (master) plt] racketcs -t count.rkt cpu time: 1266 real time: 1266 gc time: 0 4999999950000000 [samth@huor:~/sw/plt (master) plt] pycket-c -t count.rkt cpu time: 74 real time: 74 gc time: 0 4999999950000000 Finally, on programs with contracts and gradual types, one of our focuses for Pycket, Racket-on-Chez is currently substantially slower than the current Racket VM.
- samth 8y agoSource code here: https://gist.github.com/92ed7836508fe15b1e58f840a8d3a534 https://gist.github.com/92ed7836508fe15b1e58f840a8d3a534
- eggy 8y agoThank you so much for all of that! I'll have to look over this in the coming weekend. It's efforts such as these that keep me coming back to Racket again and again.