Why Go can lower GC pauses to sub 1ms and JVM has not?

后端 未结 3 2145
陌清茗
陌清茗 2021-01-01 22:18

So there\'s that: https://groups.google.com/forum/?fromgroups#!topic/golang-dev/Ab1sFeoZg_8:

Today I submitted changes to the garbage collector that m

3条回答
  •  我在风中等你
    2021-01-01 22:37

    What are the (architectural?) constraints which prevent JVM from lowering GC pauses to Go levels, but are not affecting Go?

    Principal I would say is that java is reference-oriented language, while Go is value-oriented language.

    There are many aspects of it, Object metadata, Concurrency Handling... Naturally Java doesn't allow to put primitives in collections which give a lot of overhead in a sense of amount of Objects, in Golang you have Array, Slice and Map which support primitive types...

    Here is a good article about Golang GC development and evolution.

提交回复
热议问题