-
Notifications
You must be signed in to change notification settings - Fork 68
Use -d:release for Nim #1
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
Conversation
|
Makes quite a big difference on speed, testing locally I went from 5.84 to 2.14 by using |
|
Yes, this is the official method of compiling release binaries for Nim. |
|
@frol can you merge this and re-run benchmark? Nim will be much faster with that :) |
|
I am so sorry for that! I will update the numbers ASAP! |
|
You might want to run with |
|
I will give it a try! |
|
@frol also you can use clang with Nim: |
|
@Yardanico clang makes it slower:
Notice the memory usage. Is that expected? I have updated the results! |
|
@frol can you keep both versions in the tables? One with EDIT: Also, in the compiler column, it would be better to state: |
The different GCs use different amounts of memory. I don't have the memory checking utility installed, would be interesting to run it with all the different GCs and see what the performance/memory balance between each was. |
|
@narimiran Done! |
|
Not sure why you are seeing so high memory usage rates. I installed cgmemtime and these are my results from all the different GCs: https://i.imgur.com/1Xz3Elo.png EDIT: Compiled with |
|
It seems that
|
|
Well, |
|
It makes sense that using objects vs. ref objects makes a bit of a difference. Objects are more or less the same as a struct, and will be allocated on the stack. This means that as soon as the calling proc returns the memory is freed, but it might end up costing you some memory copying if you're not careful. A EDIT: Tried to change it to a tuple and an array. Some speedup going to a tuple, not much going from tuple to an array. |
|
We have just uncovered another pity bug in Nim benchmark implementation. Testing the resulting code again, the memory footprint jumped to 5MB using swapAndSweep GC. Could you, please, confirm that is the case? Another question I couldn't find an answer to is how to enable LTO for Nim? We are going to enable it for all the languages. |
|
@frol you can pass arguments to the C compiler with --passC and --passL (you can look on how to use them in the docs). |
|
@frol, running it on my machine I only see a jump to 768KiB.. I'll investigate further and see if I can get it back down |
|
@frol Can you also try with Nim devel? If you don't want to compile it by yourself you can use choosenim (it can handle different nim version and automatically compile devel) |
|
Ah yes, it turns out that I do in fact get 5MiB when using Nim 0.18.0, using the devel version drops it to 768KiB |
No description provided.