3 ms·
I can't think of anything that I will like to make in C/C++ Let me address the motivation issue. C/C++ strength is speed. Write a simple piece of computation
by alain94040 12y ago
I can't think of anything that I will like to make in C/C++
Let me address the motivation issue.
C/C++ strength is speed. Write a simple piece of computation in your favorite language (Ruby for instance). Write the same in C and measure the time it takes.
Once you see how slow Ruby is, you may get excited by C enough to continue exploring it.
- lambdasquirrel 12y agoC/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.