Hacker News new | past | comments | ask | show | jobs | submit login

True, but don’t forget that one of the _other_ causes of performance problems in lisp programs is the creation and subsequent collection of garbage. If you know ahead of time which of your data needs to be accessed or created by the most performance–sensitive parts of your program, then you can put that data into vectors to start with and avoid all of the extra work.



Long-lived things end up in older generations and aren't traversed much during GC, which is the moral equivalent of being statically allocated.

There's overhead if you mutate old objects in a GCed system due to card marking.

Lisp vectors are vectors of pointers, so there's still an overhead of dereferencing through it. Presumably the objects being pointed to end up compacted together, eventually.


I should have been more clear; I meant using vectors as arena allocators, so that all of your data ends up stored contiguously with no extra indirection.




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

Search: