06-04-2025, 07:31 PM
(06-04-2025, 04:21 PM)SMcNeill Wrote: A practical use for mem?
Anything that requires speed.
Direct memory manipulation is much faster than referenced access to the same memory. Array(index) has to first look up the index, then calculate the offset position of that index, then check the memory location for the data you want, then return it to you. With mem, you specify the offset yourself, the amount of data you want, and presto, retrieve it
My question is, can't we update the compiler to be a little smarter, and generate code that uses these direct memory manipulation tricks, for commands like array(index)?


