[Cython] C code churn and benchmark diffs

Stefan Behnel stefan_ml at behnel.de
Thu Jan 23 20:49:12 CET 2014


Hi,

to get a better idea of what new optimisations (or C code changes in
general) actually bring, I've added a diffing step to the benchmark runner
jobs. The bigger ones now generate an additional output file
"cfiles.diff.gz" that contains a diff of the C files generated in the
current run against those of the last (successful) run. E.g. here:

https://sage.math.washington.edu:8091/hudson/view/bench/job/cython-devel-pybenchmarks-neu-py3k/

(That one should start looking a lot smaller tomorrow :)

While doing that, I noticed that there are a couple of unnecessary
differences in the C files that are due to dict iteration, which is
randomised in Py3.3+ (for security reasons). I fixed (most of?) them, so
repeated Cython runs should now generate pretty much identical output
files, if you strip the file header comment (diff can do that). The rest is
generated deterministically in source code order already.

It should be possible to do the same thing for the Sage build, I guess.
That would also be interesting to look at from time to time, especially
when things start failing for some reason.

Stefan


More information about the cython-devel mailing list