4 ms·
Hm, seems like the big win for C# was actually someone going in and optimising the benchmark programs themselves: http://anthonylloyd.github.io/blog/2017/08/15
by peoplewindow 9y ago
Hm, seems like the big win for C# was actually someone going in and optimising the benchmark programs themselves:
http://anthonylloyd.github.io/blog/2017/08/15/dotnetcore-performance http://anthonylloyd.github.io/blog/2017/08/15/dotnetcore-per...
The point of explicit control is usually performance though. So if Java can give you near equal or better performance but without the developer having to explicitly specify as much, isn't that a win?
Benchmark game also lacks the benchmark the Mono blog post is all about - developer iteration time.
- int_19h 9y agoIn many cases, Java actually can't give you near equal or better perf. "Our optimizer is smart enough, you don't need to care about stack-allocating things" has been the promise for as long as Java existed, but it doesn't really deliver that outside of fairly simple cases (which are also the ones that are typically benchmarked).
- sanxiyn 9y agoJava's new partial escape analysis should help with that.
- jackmott 9y ago>So if Java can give you near equal or better performance but without the developer having to explicitly specify as much, isn't that a win? It would be, but often times the lack of explicit control causes you to need more verbosity in Java to get around it, because the JIT isn't all knowing. For instance say you want an array of 2D vectors (x,y) and you want them in line in the array for data locality. In C# you just make Vector a struct, and put the structs in the array. In Java you would have to just put float primitives in the array and alternate the x and y and keep track of it by hand. Minecraft suffers greatly from this. As well, Java won't do anything but the most trivial automatic vectorization, and only on integers, and SIMD can be a huge win at times. I'm looking forward to more complete support droping for .net >Benchmark game also lacks the benchmark the Mono blog post is all about - developer iteration time.