Spent some time and rewrote the API to use long long.
However I have nothing to do about the data that I'm processing.
I work in the finance area so effectively my API works not with
numbers - rather with money.
And all the money in the tables is kept as packed decimals.
So what I did - I read packed decimals and immediately convert them to
long long before I make some arithmetics with them.
Result is still the same - 2 times slower than the C version...
I'll now go and experiment with the benchmarking program of yours to
see what consumes time. If conversion of packed to int (or long) is
most ti,e consuming, then probably I'm digging in the wrong