I basically extended the heap_s struct to also include the exp field. This uses twice the memory, but gets rid of the massive number of heap allocations. Unfortunately I lose the cache efficiency of the original solution, so it's still about 20-50% slower than it should be. It'll have to do for now.
I've been looking around for a specific ticket for this tuple/immutable issue, but haven't managed to find one. I see "temporary tuple elision" on Jeff's compiler optimization tracker marked as done, but I don't know what the details are. There's a bunch of tickets around the place, mostly about fixed sized arrays and so on, which seem to depend on efficient tuples. But this is all stuff that went up before the tupocalypse (which I thought made tuples efficient). I'd really like to make sure this issue has a ticket somewhere since it is so fundamental. Do you by chance know where you saw this already? If not, I'll make another ticket for it so it can be tracked explicitly. The best I can find is [1]. But I don't see any links to open tickets there. There is a pull request, but it's not totally clear to me what this fixes (though it might explain why this hasn't been fixed already). I don't understand how the Julia GC can work at all without marking roots in the stack, so I'm not sure how to understand that PR. Bill. [1] https://groups.google.com/forum/#!topic/julia-users/LthfABeDN50 On 17 August 2016 at 19:11, Kristoffer Carlsson <kcarlsso...@gmail.com> wrote: > Just make a new type instead of the tuple and directly set the fields of > it?