Am Do., 4. Sept. 2025 um 19:01 Uhr schrieb 'Martin Eden' via lua-l
<
lu...@googlegroups.com>:
>
>
> But this is common disease for C.
>
> -- Martin
>
Are you sure with "for C"? From Microcontroller Programming I know
that C is a very compact and "assembler-near" language... .
The "RAM wasting problem" of typical Computers is the "von Neumann
architecture", where the program code resides in RAM. According to
"Moore's law" of "cheap RAM doubling every year" this worked very
impressively well for the last 50 years. Just Gordon Moore died in
2023, his law currently also seems to hit physical limits, and his
company Intel is struggling, but anyway "von Neumann architecture" is
dominating large computer systems.
On the market for one-Chip computers / micro-controllers the typical
architecture is Harvard architecture - with program code residing in
ROM and RAM in "RAM-efficient" code is used exclusively for data... .
Fortunately in Lua this "keeping bin code in ROM" should now also be
possible since V5.5., as all code in the bin files should be 32bit
aligned (this is the requirement for fast int handling of ROM-data in
the very common arm Cortex-M architecture, e. g. STM32). I am
looking forward to test this soon, but I am currently still on other
"construction sites".
... just the "problem" I think is not C, but the von Neumann
architecture and the "typical assumption" of OS architectures, that
RAM is abundandly available in "any senseful size" (which is I think a
very valid assumption for most "large computer" applications, just NOT
for 1-chip-microcontrollers commonly used for IOT applications or
similar things).