News for hackers. Stuff that matters.
Re:A Look at the Internals of 'Tiered JIT Compilation' in .N... by bunderbunder on Monday December 18, 2017 @10:33PM (#15957521)
I think that the "lack of value types" is probably an overrated difference these days.

Empirically, I've found that value types generally only offer a tangible perf benefit when they're the size of a pointer or smaller. There aren't a whole lot of spots where that comes into play. Primitives, sure, but Java also has those. Beyond that, maybe you'd see some difference in code that does a lot of date calculations, maybe. I've done some slightly obscene and shameful optimizations around packing data into 64-bit structures in the past, but those are pretty special cases.

Re:A Look at the Internals of 'Tiered JIT Compilation' in .N... by matthewwarren on Tuesday December 19, 2017 @05:24AM (#15959181)
> I think that the "lack of value types" is probably an overrated difference these days.

Well, seems that the JVM designers disagree, there's been a lot of work put into fixing this, see 'Project Valhalla' for instance

https://www.infoq.com/news/2016/11/valhalla-Implementation-p... http://www.jesperdj.com/2015/10/04/project-valhalla-value-ty...

Re:A Look at the Internals of 'Tiered JIT Compilation' in .N... by pjmlp on Tuesday December 19, 2017 @02:49AM (#15958493)
No they are a real issue, and that is why Oracle is pouring millions into improving the JVM in this area.

Oracle is not a company that gives money away for free.

Fintech is one of the areas that is slowly moving from C++ into Java and doesn't do it faster because they cannot move all the kind of code they have into Java, hence Oracle efforts.

Or why we are starting to see languages like Pony and Chapel pop up.

Re:A Look at the Internals of 'Tiered JIT Compilation' in .N... by yazr on Tuesday December 19, 2017 @02:43PM (#15963465)
> Fintech is one of the areas that is slowly moving from C++ into Java

Are you referring to various trading and middle ware engines? Or mostly FE projects ?

Re:A Look at the Internals of 'Tiered JIT Compilation' in .N... by pjmlp on Tuesday December 19, 2017 @03:46PM (#15964095)
I am talking in general, based in talks from Martin Thompson and other guys working on the field.
Re:A Look at the Internals of 'Tiered JIT Compilation' in .N... by comex on Tuesday December 19, 2017 @02:45AM (#15958476)
How about vectors or coordinates? This post from a few years ago comes to mind:

http://www.minecraftforum.net/forums/mapping-and-modding-jav...

(Allegedly, a Minecraft update added significant strain on the garbage collector by switching the codebase from using separate variables/parameters for x, y, and z coordinates to using a single “BlockPos” object.)

Re:A Look at the Internals of 'Tiered JIT Compilation' in .N... by bunderbunder on Tuesday December 19, 2017 @09:13AM (#15960291)
If you're just using local values, or storing them in an array, then, yeah, value types might help. That's a likely scenario for something like storing arrays of vectors.

The spot where you take a hit is when you've got a scattering of individual objects that are being passed into and out of functions. There, the extra data copying has a tendency to outweigh the other benefits. And that's a more likely scenario for most kind of the kinds of business apps that .NET and Java are typically used for.