|
Post by emulog on Jan 10, 2023 6:42:08 GMT
I have an array of simulated RAM for CPU and need to read sequentially integer16 to int64 really fast, thus i can do 4 reads like var=mem(n) to another single var by shifting and OR'ing them in single evaluation sentence. It is quite weird, naturally in say ,C language, it is possible to read variable with a pointer to another, regardless of size. I found some clue with _MemPut / _MemGet combo for a selected single variable, but it is slow.
|
|
tonylazuto
New Member
Tony Lazuto says hello
Posts: 25
|
Post by tonylazuto on Jan 10, 2023 15:06:53 GMT
You could MEM the whole array and then MEMGET that into your INTEGER64. I don't have QB64 pulled open right now but it would be like:
DIM AS MEM memint: memint = MEM(int16array()) DIM AS INTEGER64 int64: int64 = MEMGET(memint, memint.offset, INTEGER64) MEMFREE memint
|
|