Re: Experimental Results
That test was done on Solaris in 2011 with the then current Java version.
11 years is a very long time in computing. An awful lot has been done to Java in that time and a single measurement from 2011 isn't really relevant today.
You might care to read this on GC improvements from JDK 8 to JDK 17 which covers changes from 2014 to 2021. You now have a choice of four different garbage collectors, so you can pick the one best for your work load.
as the memory must be swapped to disk even if unused
As someone else remarked, that hasn't happened in decades. Unmodified memory has no need to be written out so isn't. Unused memory probably doesn't even have swap space allocated for it.
A single active object per page can thwart the paging to disk.
Which is why many/most GCs compact to reduce VM usage. You really need to read up about the latest GC technology or you'll confuse yourself with long dead misconceptions.