-
Notifications
You must be signed in to change notification settings - Fork 2
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
Strings concatenation performance #3
Comments
That's something that @asterite mentioned in this commit comment : cbc2ff6#r32484649 I'll have a chance to go over some of the other commits and issues over the weekend and see how it changes. Also something I've noticed: some benchmarks have very different results on Ubuntu vs Mac. Specifically, there is a benchmark with Enumerable#count ( I haven't added it yet to repo) that shows 2x difference between two OSs |
Oh, I see, that's a misfortune. The only thing that I may suggest here, is to persuade potential visitors to question everything and test the cases with their real OS. But the cases you provide are really great to see the alternatives, thank you for that. |
Yep. No problem. I'll be adding more as I think of them. 1 option I'm pondering is to automate this a bit with Docker - so that there is more of a common env for benchmarks. But I will add a warning that OS & version of LLVM may affect the final results, pretty wildly. I mean in most cases - 95% - it should be pretty much the same, but I've have seen where it varies. For this me this was more of en exercise to learn more about Crystal, when it comes to specific app performance - it may vary wildly based on many other things, so all benchmarks come with a bit of inherent caveat. |
I;ll leave this open until I update the Readme. |
I'm afraid, concatenation of strings is a disputable question at the moment.
For example, here are my results:
The benchmark was built with options
--release --no-debug
, if it matters.Also, there is an issue on the topic.
Crystal 0.27.2 [60760a546] (2019-02-05)
LLVM: 4.0.0
Default target: x86_64-unknown-linux-gnu
The text was updated successfully, but these errors were encountered: