[Gambas-user] "shared library" (with inline assembler code) is slow...

Ru Vuott vuott at ...325...
Sun Jun 3 00:48:16 CEST 2012


Hello Benoit,

simply for a test I've made this simple C "shared library" .so (with inline assembler code). I noted that if I use it from a Gambas program (with Extern) it's very slow. Why?

static unsigned int car asm("raxregistro");    
static unsigned int cbr asm("rbxregistro");    
int hello(int numero) {
cbr=numero;
asm("mov rbxregistro(%rip),%eax");
asm("ciclo:");
asm("dec %eax");
asm("jne ciclo");
asm("mov %eax,raxregistro(%rip)");
return car;
}

Bye




More information about the User mailing list