4 ms·
This is true up to a point. But C is based on an abstract model of a machine, which doesn't really map closely to today's machines. For example, C's memory mode
by tbirdz 12y ago
This is true up to a point. But C is based on an abstract model of a machine, which doesn't really map closely to today's machines. For example, C's memory model basically assumes a contiguous array of bytes, but with modern systems there is a huge difference in speed between main memory and L1,L2,L3 cache. So in order to avoid costly cache misses you have to access your data in cache friendly ways, as all memory accesses are not equal as in C's model. Also consider things like vectorization (SSE, AVX, NEON, etc), memory fences, atomic operations, or threading which are not in C's machine model. Various intrinsics, standards (POSIX), and libraries exist to remedy this, but the fact remains that's C's abstract machine model is getting increasing distant from actual modern hardware.