-
Notifications
You must be signed in to change notification settings - Fork 326
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
Luna performance case — writing memory #239
Comments
@mwu-tow can you please check how these times in Luna scale with the size of array? If they are linear, we have an awesome test case for @iamrecursion to look into :) |
They seem linear enough.
|
Perfect. This means we have a "it's not optimizing well" problem instead of a "it's exponential, semantics are unclear and everything is on fire" problem. @iamrecursion please take a look at what happens here. I think you can also get away with benchmarking things like recursive adding numbers instead of memory writes, the results are pretty disappointing there too (which I think is a good thing again – if you optimize that super simple code, other things should speed up automatically). |
Brilliant catch! I'll add this to my 'to look at' list. Please do add any performance-related issues to my epic. |
Are we doing tail-call-optimization in Luna by any chance? |
Also on my to-look-at-list. |
One observation: running |
Consider the following Luna code:
And the equivalent C++ code:
Basically the program allocates an array of one million 64-bit integers and then writes to each of them using recursive
write
function.Luna output:
C++ output:
Methodology: ran several times, took the best result
Luna: used shell
luna
from luna-coreC++: MSVC 15,7 optimized x64 build
Perhaps I am again unknowingly triggering some thunk-exploding lazy evaluation trap.
Otherwise, the results would suggest some serious performance issue, as such task shouldn't be more than 50 000 times slower than C++.
The text was updated successfully, but these errors were encountered: