----- Original Message ----- 
From: "Soós Máté" <[EMAIL PROTECTED]>

 The solution is:

  char str[100];
  sprintf(str,"%lli",val);
  return newSVpvf("%s", str);

(this works 100% correctly)

which is funny, because it slows it down a LOT.

--------------------------------------

Instead of:
return newSVpvf("%s", str);

you could:
return newSVpv(str, 0);

or:
return newSVpv(str, strlen(str));

or (if you also change the function to return a 'char*' instead of an 'SV*')
simply:
return str;

However, I don't know if any of those alternatives will make it run any
faster. It depends on the overheads of newSVpvf() vs newSVpv(), and I've not
benchmarked either of those.

Cheers,
Rob

Reply via email to