2 ms·
Factorio I think is particularly poorly suited to memory managed languages. My factory is enormous, hundreds of thousands of machines all doing their thing in r
by donatj 4y ago
Factorio I think is particularly poorly suited to memory managed languages. My factory is enormous, hundreds of thousands of machines all doing their thing in real time. Thousands of robots flying around delivering goods. I think that really does in fact demand high level optimization.
- bombcar 4y agoFactorio does really weird things with memory (the deterministic simulation effectively reads all memory every tic) that makes it not perform like many applications are expected to.
- deepsun 4y agoDon't see any problem there, how does it relate to portability? Anyway games are going to pre-allocate large arrays and work on them, for cache affinity. That doesn't depend on C++ vs. Java. No need to create a separate object for each item in your factory, but rather a row in the array(s). And even if you do create a new object for each item, it's better to do that on heavily optimized heap, than manually allocating/deallocating memory in the same thread. You end up writing that heap in C++ anyway.