Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
maydup-nem
on May 3, 2021
|
parent
|
context
|
favorite
| on:
The compiler will optimize that away
The first approach creates a list, which means cheap insert/delete. But it's not a fair comparison, as the second approach doesn't let you do that. For that, you would need to allocate an array of objects in the first approach instead of a list.
Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: