4 ms·
I agree that it'd be more correct to make the C and python code output the same answer. The important thing here is how to hook up C code to python. the bench
by jiaaro 14y ago
I agree that it'd be more correct to make the C and python code output the same answer.
The important thing here is how to hook up C code to python.
the benchmarks are still (mostly) valid because it's still the same number of addition operations (regardless of the overflow).
Honestly, I'm not a very good C programmer (as you can see). I was really just documenting how to do this for myself. I never expected to get such a big surge of traffic from HN.
That being said, I'll take a second look at the code and try to make it more correct, suggestions welcome!