Top all-time · #527
Aleksey Shipilëv
Personal blog · shipilev.netprogrammingsystems
Aleksey Shipilëv's personal blog at shipilev.net covers programming and systems. Since 2014, 112 different Hacker News readers have linked it 169 times, most often “JVM Anatomy Quarks”. No feed was found, so read it on the site itself.
Sometimes recommended · 12 of 40 sampled comments recommend it?
Why HN links it
HN readers link Aleksey Shipilev's JVM writing, mainly the Anatomy Quarks series, for JVM internals, benchmarking and the Java memory model.
- Recommended for · 12 comments
- Called "awesome", "excellent", "fascinating" and "required reading"; one says his whole blog is worth reading.
Summarised by Claude from a sample of 40 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Most-linked posts?
- JVM Anatomy Quarks12 people · 14 mentions · first linked 2020-01-30
- /jvm/anatomy-quarks/18-scalar-replacement/6 people · 7 mentions · first linked 2020-08-05
- JVM Anatomy Quarks: Compressed References5 people · 5 mentions · first linked 2019-03-06
- Please Test Your Memory5 people · 5 mentions · first linked 2020-09-27
- JVM Anatomy Quark #25: Implicit Null Checks5 people · 5 mentions · first linked 2020-01-11
- /blog/2015/black-magic-method-dispatch/4 people · 6 mentions · first linked 2017-07-29
- /jvm/anatomy-quarks/4-tlab-allocation/4 people · 4 mentions · first linked 2023-01-10
- The Black Magic of Java Method Dispatch4 people · 4 mentions · first linked 2015-02-12
- Java Objects Inside Out4 people · 4 mentions · first linked 2020-04-13
- JVM Anatomy Park #18: Scalar Replacement4 people · 4 mentions · first linked 2018-01-24
What Hacker News says?
This stuff is really hard to pin down though. I've been reading these sorts of debates forever. It's true that pointer chasing really hurts in some sorts of program and benchmark. For sure. No argument. That's why Project Valhalla exists. But it's also my view that modern C++ programming gets away with a lot of slow behaviours that people don't really investigate or talk about because they're smeared over the progra…
Comment linking /jvm/anatomy-quarks/11-moving-gc-locality/
on “Why Discord is switching from Go to Rust”Submitted JVM Anatomy Park as a story · 356 points
HN discussionJava compressed object pointers. Shipilev (JVM performance engineer) explains it in great detail here: https://shipilev.net/jvm/anatomy-quarks/23-compressed-refere... But the short of it: Java uses 32-bit numbers for object references if it can address whole heap with it. Given default 8-byte alignment of object we have 2^32 * 8 = 32g of addressable heap. Once we are beyond that number 64-bit references are used and…
Comment linking /jvm/anatomy-quarks/23-compressed-references/
on “Guide to running Elasticsearch in production”Submitted Java vs. Scala: Divided We Fail as a story · 238 points
HN discussionIf the heap is under 32GB, the JVM can use "compressed oops" with 4 byte "pointers" to 8 byte offsets inside the 32GB heap instead of 8 byte pointers. This makes everything more compact. Since Java doesn't have structs, everything is a pointer and arrays of things are arrays of pointers. So a 48GB heap won't fit a lot more data than a 32GB heap. See https://shipilev.net/jvm/anatomy-quarks/23-compressed-refere... htt…
Comment linking /jvm/anatomy-quarks/23-compressed-references/
on “Guide to running Elasticsearch in production”Submitted JVM Anatomy Quarks as a story · 230 points
HN discussionI also recommend this JVM anatomy https://shipilev.net/jvm-anatomy-park/
Comment linking /jvm-anatomy-park/
on “JVM Internals (2013)”Submitted JVM Anatomy Quarks as a story · 193 points
HN discussion>> we have a giant for loop that iterates over all of memory over and over and over > How is that not how garbage collectors work?... I'm assuming we're talking about a standard, generational mark-and-sweep gc GCs do not scan "all memory", but small fraction of memory. In case of generational GC the scanned fraction of memory is (usually) limited to single generation. Even without generational approach scanning heap…
Comment linking /jvm/diy-gc/
on “For Better Computing, Liberate CPUs from Garbage Collection”Submitted Do-It-Yourself OpenJDK Garbage Collector as a story · 155 points
HN discussionAside from what the sibling says about the difference between the test harness code and the code being benchmarked, there's a more abstract point: you want the compiler to reduce it to a compile time constant if and only if in the real world cases you're trying to model, it will be able to do so. That's pretty rare, since if that happens, you probably wouldn't have to do performance analysis on that code. These days…
Comment linking /blog/2014/nanotrusting-nanotime/
on “Why is 2 * (i * i) faster than 2 * i * i in Java?”Submitted String.intern() as a story · 145 points
HN discussionFor further details on how objects are not exactly allocated on the stack: https://shipilev.net/jvm-anatomy-park/18-scalar-replacement/
Comment linking /jvm-anatomy-park/18-scalar-replacement/
on “Java’s new garbage collector promises low pause times on multi-terabyte heaps”Submitted JVM Anatomy Quarks: Compressed References as a story · 141 points
HN discussionI'm not arguing against value types as I definitely want those too but it's not that simple nowadays - a moving garbage collector (like all modern server jvm's have) can do things for locality that non-moving systems (gc'd or not) can't - https://shipilev.net/jvm-anatomy-park/11-moving-gc-locality/
Comment linking /jvm-anatomy-park/11-moving-gc-locality/
on “Java’s new garbage collector promises low pause times on multi-terabyte heaps”Submitted JVM Anatomy Park – 11: Moving GC and Locality as a story · 138 points
HN discussionThat is a good point. I don't know, so I've been googling around and came across this awesome article: https://shipilev.net/jvm-anatomy-park/18-scalar-replacement/ It essentially says that java doesn't (ever?) allocate Objects on the stack, but it sometimes approximates it by just storing the scalar values (that would have been part of the object) on the stack, and never allocating the object (with its headers) at a…
Comment linking /jvm-anatomy-park/18-scalar-replacement/
on “Getting to Go: Garbage collection and runtime issues”Submitted The Black Magic of Java Method Dispatch as a story · 130 points
HN discussionI agree in general, but in this particular case (escape analysis [1]), you won't see what's happening in the ByteCode output. That being said, it's still very easy to see how the code will be JITed by running it through JMH (or just making sure it runs enough time to be optimized). The JVM and IDEs like IntelliJ contain tons of tools to review that. To get back to the issue at hand, from my personal experience, if y…
Comment linking /jvm/anatomy-quarks/18-scalar-replacement/
on “Half a million lines of Go”Submitted JVM Anatomy Quark #10: String.intern (2019) as a story · 119 points
HN discussionRegarding the question in the 1st topic: ( https://shipilev.net/jvm-anatomy-park/1-lock-coarsening-for-... ) " for (...) { synchronized (obj) { // something } } …could it optimize into this? synchronized (this) { for (...) { <----XXX---- // something } } " The answer would be no in general, I think, since it is unsafe. Moving the entire loop into the synchronized block would make the statement marked XXX above, i.e…
Comment linking /jvm-anatomy-park/1-lock-coarsening-for-loops/
on “JVM Anatomy Park”Submitted Close Encounters of the Java Memory Model Kind as a story · 109 points
HN discussion> A failure can propagate in the same circumstances in a Rust program. What do you consider failure? A result or a panic? Those are worlds apart. > First, Rust has panics, which are exceptions. That's not how exceptions work in Java. Exceptions are meant to be caught (albeit rarely). Panics are meant to crash your program. They represent a violation of invariants that uphold the Safety checks. Only in extreme cases…
Comment linking /blog/2014/exceptional-performance/
on “Lies we tell ourselves to keep using Golang (2022)”Submitted Java Memory Model Pragmatics as a story · 108 points
HN discussionThis is not a comprehensive resource, but it provides 25 bite-sized essays about different aspects of the JVM: https://shipilev.net/jvm/anatomy-quarks/
Comment linking /jvm/anatomy-quarks/
on “How to write a toy JVM”Submitted JVM Anatomy Quark #26: Identity Hash Code as a story · 101 points
HN discussionPretty much anything Aleksey Shipilev has ever done, tbh. Here's an example - https://shipilev.net/blog/2014/jmm-pragmatics/
Comment linking /blog/2014/jmm-pragmatics/
on “How to write a toy JVM”Submitted Please Test Your Memory as a story · 12 points
HN discussion> The most interesting new feature I think is the Shenandoah GC. Well, one could build and run Shenandoah GC with JDK8 and JDK11. Ref: https://wiki.openjdk.java.net/display/shenandoah/Main#Main-B... Here's a presentation on Shenandoah by one of the principal developers (focuses on the how): https://youtube.com/watch?v=4d9-FQZZoVA Slides: https://christineflood.files.wordpress.com/2014/10/shenandoa... Another present…
Comment linking /talks/devoxx-Nov2017-shenandoah.pdf
on “Java 12”Submitted Safe Publication and Safe Initialization in Java as a story · 12 points
HN discussion