Makes a lot of sense, cool that the garbage collector can run independently of the call stack and function scheduler.
Makes a lot of sense, cool that the garbage collector can run independently of the call stack and function scheduler.
This whole approach is going to be orders of magnitude of overhead and the GC can’t do anything because you’d still be allocating the object, setting it up, etc. Your only hope would be the JIT seeing through this kind of insanity and rewriting to elide those objects but that’s not something I’m aware AOT optimizer can do let alone a JIT engine that needs to balance generating code over fully optimal behavior.
Don’t take my word for it - write a simple benchmark to illustrate the problem. You can also look throughout the comment thread that OP is just completely combative with people who clearly know something and point out problems with his reasoning.
Let's say talk about this in another more general case: virtual windowing. If anyone has tried to implement stuff and hit performance bottle neck and then find virtual windowing could help, it definitely involves two problems to solve, first is the UI responsiveness when more and more stuff got created and rendered, the object count usually should be way less than "10,000,000", yet still you could hit the wall.
I think I might be too negative about it, but I just want to share the real cases here.
I was trying to keep an open mind, it's easy to be wrong with all that's going on in the industry right now.
Thanks for clarifying some of the details back to what I was originally thinking.