3 ms·
One time I needed my ahk script to go much faster, looping over all pixels at 60fps or something^. So I wrote a function in C, compiled it, and copied the machi
by infogulch 3y ago
One time I needed my ahk script to go much faster, looping over all pixels at 60fps or something^. So I wrote a function in C, compiled it, and copied the machine code from the object file into a literal hex string in the script. Then when the script ran it decoded the string into a buffer and called the buffer address with DllCall. This actually worked and was much faster as expected.
What's the point of wasm when you can just write your machine code to a buffer and call it. Psh, kids these days.
^: https://news.ycombinator.com/item?id=23160930 https://news.ycombinator.com/item?id=23160930
- chii 3y ago> Then when the script ran it decoded the string into a buffer and called the buffer address with DllCall. This actually worked and was much faster as expected. You've just discovered manual JIT ;)