Efficient integer division (quotient) and modulo

Rob Hunter rhunter@mercedsystems.com
Tue Jul 3 15:40:00 GMT 2007


Does anyone know how, in Kawa, I can write something like

(/ a b)

and

(modulo a b)

(where a and b are <int>), and have it compile to efficient bytecode?  I.e.,
the bytecode that would be generated by

int a = ...;
int b = ...;
int c = a / b;
int d = a % b;

Thanks for any advice,

Rob



More information about the Kawa mailing list