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

Thank you for saying it for me. I keep reading it here and it's so frustrating I'm starting to give up trying to correct it.

Also @nine_k "...paying no more than O(log N) cost for that". Assuming this is true, and I've never heard of it, please consider by what metric that price is paid. In computing science terms things are usually given in numbers of operations but that's a terrible fit for modern CPUs.



I'm not sure about any, but a lot of the persistent data structures seem to fit within that limit, and it's what's used in FP languages like Clojure. There's also some compiler research of identifying when something won't be used anymore and simply doing the mutation in-place, which can reduce even further the costs incurred by immutability


Cost of addition: 1 cycle (I think).

Cost of a read or write to RAM: 150 to 200 cycles, and it gets worse from there if you have a TLB miss

It gets complex, but basically don't believe me or anything else you read without digging into it and asking why and what.




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

Search: