This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Efficient integer division (quotient) and modulo


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]