Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
How do you run/update the numbers on Mono? #3
How are you running/updating the numbers in Mono, as there is no MathF there yet.
I did a port from MathF to the DesktopCLR API, which is supported in Mono, and put my changes here:
The odd thing is that on my system, .NET Core 2.1.4 seems slower, perhaps we have different versions?
That said, to make it more apples to apples, I just submitted a pull request to Mono to get MathF:
With that patch, I can compare apples of the same species, and now I get:
Thanks xoofx! That does explain the difference!
With this change, on my machine I get 19.5 for .NET Core, and 7.3 for Mono, when using -O=float32
Update: I tried to use the LLVM backend for Mono. The numbers cannot be compared with the number above as I do not have a compiled version of Mono/LLVM with
Ok, phew, so I did not do a gross mis-representation of Mono; it is close to 3x slower on this particular workload than .NET Core. I'll add a note on float32 & LLVM options to the post.
Why is 32 bit floating point not the default by the way? (my guess would be on a "it's a long story...", which is fine :))
Ok, this has turned out to be a good exercise!
Our LLVM support was still doing 32->64 casts, so we were not really getting the full gains of 32-bit float when using LLVM!
So we just fixed that too. And we also increased the inline limit (pending pull request) that is more suitable for LLVM.
The current inline limit was suitable for Mono's JIT compiler, but it was too small for LLVM, so this is closer to C++. The value currently can be tuned by hand using the
This is running on a different computer, so I can not compare apples/apples against the above, but the results are now as follows:
Ok, just got home, and got numbers for the same machine that I originally tested on.
So in this one, I am testing .NET Core 2.1.4 and both Mono/master that includes the LLVM float32 support, and that one with more aggressive inlining:
added a commit
Apr 16, 2018
I just wrote an update to Mono performance tweaks, including link to your blog post here: http://aras-p.info/blog/2018/04/16/Daily-Pathtracer-10-Update-CsharpGPU/
Will close this issue; thanks for the investigation & suggestions!