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

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: