Earlier quoted context omitted.
When you embed a composite object into another composite object, in Java there always needs to be a pointer indirection between them. Even if GC and allocation is free, this is a massive performance loss. (For example, if you have something that would fit into 4 bytes, now you have to fit a 8-byte pointer, and the minimum created object is probably 16 bytes.) Alternatively you can just flatten everything into a singl…
Can't the compiler flatten objects into one another? For example, if one class includes a reference to another, merge the fields and methods of both classes into one big mega-class, then see if there is any redundant code which can be removed for this new megaclass.
Java’s new garbage collector promises low pause times on multi-terabyte heaps
161–170 of 245 posts
Re: Java’s new garbage collector promises low pause times on multi-terabyte heaps
#162Earlier quoted context omitted.
"It is time to unmask the computing community as a Secret Society for the Creation and Preservation of Artificial Complexity." ~Dijkstra It's very impressive work, no doubt. And as long as no one asks me to debug anything running on top, I don't have any issues with it. At least with straight reference counting I know what's going on under the hood, that's worth a lot. Sharing pointers across threads is tricky busine…
I've always thought the Monty Python Sketch about The Royal Society for Putting Things on top of Other Things was a perfect metaphor for modern "full stack" software development. https://www.youtube.com/watch?v=1f-kfRREA8M And the Ministry of Silly Walks is the perfect metaphor for user interface design. https://www.youtube.com/watch?v=iV2ViNJFZC8
Silly walks is a masterpiece, and people think they're joking...
Re: Java’s new garbage collector promises low pause times on multi-terabyte heaps
#163Earlier quoted context omitted.
Okay, what's better, from a generalist standpoint? I have a decent but very high-level sketched-out understanding of refcounting, but I know nothing else about what's out there, and would be curious to find out. Particularly what would work well on x86 and ARM. An odd and probably completely wrongheaded idea just came to mind: add collectible objects to a lock-free queue in one thread, collect them in another. I wond…
Better, depends on tradeoff's. RefCounting misses a key feature that ZGC, C4, Shenandoah and other Java GCs do (but not e.g. GO) and that is compacting. Secondly when accessing ref counted objects concurrently ref counting needs to be thread safe. i.e. using atomics, this does have significant performance overheads. Pragmatically in high-throughput situations modern GC's perform better than simple GC. The new things…
Re: Java’s new garbage collector promises low pause times on multi-terabyte heaps
#164Earlier quoted context omitted.
Openjdk8 or get out! Seriously though I am concerned about the future of Java. I am keeping everything openjdk8 personally.
Why?
Re: Java’s new garbage collector promises low pause times on multi-terabyte heaps
#165Earlier quoted context omitted.
With generational GC, does this even matter? Generation 0 is pretty much a stack as far as performance and operation go.
Problem is memory locality, or lack thereof. Having to chase pointers around and not having things laid out in sequence doesn't play well with the CPU cache.
Re: Java’s new garbage collector promises low pause times on multi-terabyte heaps
#166Earlier quoted context omitted.
Hrm, I would think that if you were developing a game in a GC environment, where GC timing turned out to be a problem, you would get rid of dynamic memory allocation, and try to do everything much more like embedded system programming with fixed memory blocks...? I suppose at the complexity of modern games that's simply not possible anymore...
You can do that, and people do. However a GC language doesn't normally give you the flexibility of getting a block of memory and doing whatever you want inside it, instead you use things like object pools.
Re: Java’s new garbage collector promises low pause times on multi-terabyte heaps
#167Earlier quoted context omitted.
> Java is already suitable for game development, specially with LibGDX. I think it is safe to assume that under "game development" most people understand rather high performance demands, not a solitaire clone (esp since the comment you responded to pointed out pause-times as crucial).
Wasn't Minecraft originally written in Java? Might still be.
Re: Java’s new garbage collector promises low pause times on multi-terabyte heaps
#168Earlier quoted context omitted.
Google v Oracle comes to mind.
Didn't Google end up importing OpenJDK code?
They only support part of the standard library, the OpenJDK parts have been cherry picked and not all are made available on the same Android version and then there are the bytecodes that were introduced since Java 7.
And for Java language support, you need to have Android Oreo version of ART as not all language features get desugared into older versions.
There is some AOSP activity related to Java 9, but so far Google has been silent if there will be any further improvements beyond Java 8.
Re: Java’s new garbage collector promises low pause times on multi-terabyte heaps
#169Re: Java’s new garbage collector promises low pause times on multi-terabyte heaps
#170We use Shenandoah everywhere. It’s amazingly great.
Is that checked into OpenJDK for the 11 release? Does it have any advantages to ZGC?
(If it also means anything, I can confirm that enabling Shenandoah is as simple as taking the corresponding OpenJDK code and replacing the `hotspot` subcomponent with the (compatible) Shenandoah fork'd hotspot component, then just building everything normally.)