Why are lists used infrequently in Go?

前端 未结 7 1269
眼角桃花
眼角桃花 2021-01-30 07:57

I\'m new to Go, and quite excited about it. But, in all the languages I\'ve worked with extensively: Delphi, C#, C++, Python - Lists are very important because they can be dynam

7条回答
  •  有刺的猬
    2021-01-30 08:50

    Unless the slice is updated way too often (delete, add elements at random locations) the memory contiguity of slices will offer excellent cache hit ratio compared to linked lists.

    Scott Meyer's talk on the importance of cache.. https://www.youtube.com/watch?v=WDIkqP4JbkE

提交回复
热议问题