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

scopes version of sudoku solver #36

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

Conversation

msklywenn
Copy link

@msklywenn msklywenn commented May 4, 2020

As I started learning the scopes language and since it stated "performance of C", I wanted to check by myself. Adaptating the sudoku solver benchmark was a way of doing both learning and checking. Performance is indeed pretty good.

$ clang sudoku_v1.c -O3 -fomit-frame-pointer -o sudoku_v1.clang.exe
$ gcc sudoku_v1.c -O3 -fomit-frame-pointer -o sudoku_v1.gcc.exe
$ scopes sudoku_v1.sc && gcc sudoku_v1.sc.o sudoku_v1.sc.c.o -o sudoku_v1.sc.exe
$ time ./sudoku_v1.clang.exe < sudoku.top5k >/dev/null
real 0m2,017s
user 0m0,000s
sys 0m0,015s
$ time ./sudoku_v1.gcc.exe < sudoku.top5k >/dev/null
real 0m2,093s
user 0m0,000s
sys 0m0,015s
$ time ./sudoku_v1.sc.exe < sudoku.top5k >/dev/null
real 0m2,742s
user 0m0,000s
sys 0m0,015s

Intel Core i7-3520M @ 2.9Ghz, 8GB RAM, Windows 10, mingw64

@msklywenn
Copy link
Author

I've added a racket implementation too. It's much slower than the scopes version.

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.

1 participant