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

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.



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

Search: