Re:Small Memory Software: Patterns for systems with limited ...
by creshal on Monday March 14, 2016 @06:07AM
(#11281896)
> Finally, it should be noticed than on "normal" systems, memory size is still important because of the many caches they feature.
http://www.7-cpu.com/cpu/Skylake.html
L1 cache: 32 KiB, 4 clock cycles (=1 nanosecond) latency
L3 cache: (Up to) 8 MiB… with a latency (42ns) equivalent of 2½ branch mispredictions. You know, the things that Everyone Knows™ they should avoid with compiler hints like __builtin_expect.
RAM: As much as you want… at 246 cycles (61.5ns) latency.
Memory consumption can be a primary issue for small embedded targets. Upgrading the hardware is often not an option or is actually more costly than development time, because development is a one-time cost, while adding RAM or flash is an extra production cost (so a per-unit cost).
Moreover, embedded software tends to be more stable feature-wise than desktop or server software: once it's done, you can expect that it won't be modified for a few years. From my experience, the smaller the system the more "carved in stone" it is.
Finally, it should be noticed than on "normal" systems, memory size is still important because of the many caches they feature.