3 ms·
Sure, I didn't mean "what the JVM can do in extremis"; just "what the JVM's designers imagined the average-case use of the VM to be--the one worth optimizing an
by derefr 13y ago
Sure, I didn't mean "what the JVM can do in extremis"; just "what the JVM's designers imagined the average-case use of the VM to be--the one worth optimizing and creating fast-paths for."
Most sequential programs that rely on native threads, whether in C or Java or whatever, just use 5-10 "big" threads, where each thread is still multiplexing work on its own large corral of data. In a game, for example, you'll see one "graphics thread", one "network thread", one "AI thread", etc. Not "one graphics thread per voxel"; not "one network thread per peer connection"; not "one AI thread per NPC". These designs are bad, in a traditional sequentially-oriented VM, precisely because they will blow up on you in the worst case (e.g. when you look to the horizon on a Minecraft server.)