A lot of the good stuff in the talk was done by Austin Clements.
We understood how to do size segregated spans, we understood how to do low or zero contention allocation paths.Speed: Non-copy did not concern us, allocation admittedly might be slower but still in the order of C.It's a local operation so it scales fairly well.The next thing that is important is the fact that Go is a value-oriented language in the tradition of C-like systems languages rather than reference-oriented language in the tradition of most managed runtime languages.For example, this shows how a type from the tar package is laid out in memory.
All of the fields are embedded directly in the Reader value.
This one design decision has led to some of the more amazing things that have to go on with the runtime. Basically this is a knob that adjusts how much CPU you want to use and how much memory you want to use.
It is probably the most important thing that differentiates Go from other GCed languages. First of all, reproducibility of program execution is a lot easier which makes moving forward with compiler improvements much faster. The default is 100 which means that half the heap is dedicated to live memory and half the heap is dedicated to allocation. Max Heap, which is not yet released but is being used and evaluated internally, lets the programmer set what the maximum heap size should be.
We also needed something quickly and focused on latency but the performance hit had to be less than the speedups provided by the compiler. We had basically a year of compiler performance improvements that we could eat up by making the GC concurrent. If we kept the write barrier turned off most of the time the compiler optimizations would be minimally impacted and the compiler team could move forward rapidly. If it knows the size of the objects in a span it simply rounds down to that size and that will be the start of the object.
Go also desperately needed short term success in 2015. Of course size segregated spans have some other advantages.
12 July 2018 This is the transcript from the keynote I gave at the International Symposium on Memory Management (ISMM) on June 18, 2018.