[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: How strict is Lua in honoring collectgarbage() and its subcommands?
- From: Brigham Toskin <brighamtoskin@...>
- Date: Thu, 28 May 2015 21:38:59 -0700
It's a bit of a mess, as one might expect from prototype code, but I can't even really do much to clean it up because I don't really understand what going on.
The first two versions, labeled "Hash-Linked" and "Index-Linked" were ideas that popped into my head at like 4 in the morning. They seem somewhat impractical overall (and most definitely leak memory), but I was curious if potential cache benefits might make pursuing one or both worth while. "Traditional" is a lisp-style linked list based on pairs where the second element is the next node table. And "Array-Tables" is just list-style manipulators wrapped around a lua array table for reference.
Of particular note, "Traditional" claims to use less memory and run faster if it comes before the others. Scratching my head on that one. Heap fragmentation? Rogue collector disobeying my commands? Did I cross the particle streams somewhere and open a portal to Gozer?