[Gambas-bugtracker] Bug #1701: Very Slow 33times pointers l = long@(xxxpointer) notation compared to memcpy(varptr(l), MyPointer, sizeof(gb.long))

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Sun Dec 22 21:49:23 CET 2019


http://gambaswiki.org/bugtracker/edit?object=BUG.1701&from=L21haW4-

Comment #1 by Benoît MINISINI:

Not unexpected: Gambas is an interpreter, and moreover it checks illegal memory access when using pointer reading functions like Long@(). So things are slower.

I don't know what you want to achieve, but an interpreted language is usually not the good tool for doing such things (copying memory with pointers).

You could have luck with the JIT compiler, but alas at the moment it does not optimize the xxx@() functions. If optimization had been implemented, you would get very good speed.




More information about the Bugtracker mailing list