benchmarks icon indicating copy to clipboard operation
benchmarks copied to clipboard

Added functional programming version of go bf2

Open lologarithm opened this issue 8 years ago • 3 comments

Made a version of the go interpreter that matches the Scala implementation instead of the standard struct based system.

Performance is better as well :)

lologarithm avatar Dec 20 '16 22:12 lologarithm

hm seems this is slower for bench.b, 5.36s -> 5.57s, for mandel.b it faster 100s -> 70s, but for gccgo it also slower.

kostya avatar Dec 21 '16 15:12 kostya

That seems strange it would be slower for bench.b but faster for mandel.b.

I didn't test with gccgo locally (only go 1.7.3 on ubuntu 16.04).

I can do some more benching and see if I can figure out why that would be. Could you try a few times and see if that time was just a fluke?

lologarithm avatar Dec 21 '16 15:12 lologarithm

mandel.b Go 75.26s, 2.7Mb Functional Go 48.05s, 1.7Mb

For bench.b I see Go 4.34s, 1.4Mb Functional Go 3.10s, 1.4Mb

I ran the tests about 10 times and didn't see much divergence from what I pasted here.

lologarithm avatar Dec 21 '16 16:12 lologarithm