6 ms·
I applaud his effort (and this certainly isn't an easy project, he's a smart guy, etc.), but felt progressively more and more queasy reading this. I thought I c
by oconnore 15y ago
I applaud his effort (and this certainly isn't an easy project, he's a smart guy, etc.), but felt progressively more and more queasy reading this. I thought I could keep going even once I had realized the necessary lack of a runtime lambda or first class closure. When I got to the refcounting part, I mashed the back button in horror. Am I spoiled or what?
- nakkaya 15y agoThe reason I used ref counting instead of a proper garbage collector is that, most microconstollers have couple kilobytes of ram (a ATmega328 has 2KB) every garbage collection scheme I've looked at was using a lot of ram, plus ref counting is slow but it is predictively slow, if you are taking measurements at 100 times a second it will always be 100 times a second, you won't have pauses right in the middle of the routine (or say when you are in the air making a maneuver).
- radarsat1 15y agoIt's a myth that malloc/free is constant-time in a reference-counting scheme. If you are doing real-time programming, malloc/free should be avoided as much as garbage collection.