Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Binary-trees is very interesting. Showcases how Java can easily compete with native code that uses hand-managed arena allocators. While investigating why it is so much better than .NET* in this case I reached a conclusion that one of the major contributing factors is that it uses TLAB which "inlines" the GC allocation code completely into the callers, making the allocations indeed just thread-local pointer bumps. .NET has something similar (allocation context) but you do have to go through a call. I assume TLAB allocations and TLAB refills are just this much better regardless.

(* in all the number crunching ones we have every other GC language, including Java and Go, confidently beat <3 )



Yeah, it's probably a bit unfair given that GC research itself is just Java.

Also, there might be some philosophical difference at play here, Java (the JVM) tends to expose only a very limited API (no structs, pointers, etc), but this allows more flexibility on the runtime part, while .NET let's the developer touch/control everything, but that might means less room for doing some advanced stuff on the runtime side.

The age-old generic-specific balance.

(Also, I like this playful competition between languages, much better than pointless flamewars :D)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: