Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added functional programming version of go bf2 #113

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lologarithm
Copy link

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 lologarithm changed the title Added functional programming version of go Added functional programming version of go bf2 Dec 20, 2016
@kostya
Copy link
Owner

kostya commented Dec 21, 2016

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.

@lologarithm
Copy link
Author

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants