4 ms·
C/C++ can also produce data structures that are more compact than any managed language could allow. For example, one of the oldest tricks in raytracing is to st
by lambdasquirrel 12y ago
C/C++ can also produce data structures that are more compact than any managed language could allow. For example, one of the oldest tricks in raytracing is to stuff a few bits of information into the lower bits of a float, so that you don't have to waste a whole byte encoding the metadata for a kd-tree node. But even this is ultimately related to speed. It allows the programmer to squeeze a whole lot into a cache line.
- fleitz 12y agoThere's also the advantage of sequential memory access, it's generally not idiomatic in higher level languages to use contiguous arrays.