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

Port btest to D #3

Closed
wants to merge 25 commits into from
Closed

Port btest to D #3

wants to merge 25 commits into from

Conversation

eatonphil
Copy link
Collaborator

@eatonphil eatonphil commented Mar 28, 2018

Some local numbers testing against bsdscheme's suite (btest is crsytal-btest, dbtest is d-btest):

$ { time btest ; } 2> time.text; cat time.txt
btest  0.47s user 0.47s system 95% cpu 0.990 total
$ { time dbtest ; } 2> dtime.text; cat dtime.txt
dbtest  0.15s user 0.11s system 74% cpu 0.356 total

Over 66% improvement on total time in this suite. The code is also ~300 lines whereas crystal was ~400 lines. Now there is no pretty formatting so that might account for some many things.

Pieces I know I'm missing in this initial PR:

@eatonphil eatonphil changed the title pWIP] Start port to D [WIP] Start port to D Mar 28, 2018
@eatonphil eatonphil changed the title [WIP] Start port to D Start port to D Mar 31, 2018
@eatonphil eatonphil changed the title Start port to D Port btest to D Mar 31, 2018
@eatonphil
Copy link
Collaborator Author

Example of this in use in BSDScheme eatonphil/bsdscheme#45

@faustinoaq
Copy link
Contributor

Hi @eatonphil I have seen neither D or Crystal are using compiler optimization, crystal is a bit slow on normal build mode because it avoid a lot of performance checks in aims to compile faster, if really want to test performance please use -b release for D and --release for Crystal.

Also see my PR #4, I'm not an expert, so I think my PR would be improved even more 😉

@eatonphil
Copy link
Collaborator Author

I set the default to not parallelize runners because I don't synchronize on runner output... all the output got mixed up randomly. So this way all output is under the appropriate runner text group. You can explicitly enable parallel runners in the btest.yaml. In the future we may want to collect/synchronize output (for other reasons) such that this wouldn't be an issue.

@briansteffens
Copy link
Owner

Merged on the command line 🎉

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