3 ms·
You've also now gone from an immediate-mode renderer to a retained-mode renderer (allowing future transformations on rendered segments, etc.) "for free". But yo
by thelazydogsback 6y ago
You've also now gone from an immediate-mode renderer to a retained-mode renderer (allowing future transformations on rendered segments, etc.) "for free". But you're also adding potentially millions of new GC objects on the heap that weren't there before, so not so free.
- ryanschneider 6y agoQuite possibly all those `Drawable.paths` sets are going to be stack allocated as long as your renderer isn’t retaining any references to them.
- ken 6y agoHow do you figure? He's not using any reference types, and he's using a language that doesn't even have a GC. It's likely the Set<Path> will use heap allocation internally (there isn't really a way around that), but it's only holding a small value type. Besides, this wasn't a streaming interface before this change, either. In the first version, all elements were held in an array already.
- thelazydogsback 6y agoAFAIK Swift supports GC, though only simple ref-counting at the moment. Yes, it's the Set<Path>s that I'm talking about.