3 ms·
Are the number of garbage objects generated by idiomatic Go and idiomatic Java comparable? My guess is Go implementation will produce an order of magnitude les
by vardump 10y ago
Are the number of garbage objects generated by idiomatic Go and idiomatic Java comparable?
My guess is Go implementation will produce an order of magnitude less garbage.
In Go, an array of structs (= objects) is just one object.
In Java, an array of objects is array object itself plus one object for each value in the array. Except for elementary types, like bool, int, long, etc.