3 ms·
From http://openjdk.java.net/jeps/192 http://openjdk.java.net/jeps/192 > Taking the above into account, the actual expected benefit ends up at around 10% heap
by dj-wonk 12y ago
From http://openjdk.java.net/jeps/192 http://openjdk.java.net/jeps/192
> Taking the above into account, the actual expected benefit ends up at around 10% heap reduction. Note that this number is a calculated average based on a wide range of applications. The heap reduction for a specific application could vary significantly both up and down.
- tetha 12y agoI don't think an average is useful in any way here. It will reduce the heap use by some amount, since you reduce the number of char arrays in N strings to some number less than - or equal - than N. There won't be any new arrays allocated. But in my team alone, we have services which deal with many equal but transient strings, some services with long-living, mostly equal strings, some services with long-living, radically different strings. In some of them, I expect rather massive reductions, in others, interning probably has most of the work done already and in others, there's no application or the GC will handle the issue already.
- asdfaoeu 12y agoThe garbage collector needs to store its internal arrays.