A test project to be used in conjunction with Godbolt's Compiler Explorer. Possibly the greatest project name in existence.
This project has a companion article that explains the background in sufficient detail along with code commentary any analysis: mulle-objc: investigation to inline mulle_objc_object_call
How this works
is the start for this project. This file does technically exactly the same thing
mulle_objc_object_call does. Especially all the offsets in the various
structs are identical. The code has just been stripped down to the bare
If you can make the output better with some obscure compiler flags, please let me know in the Issues.
To actually run a benchmark to compare these files, there is a
folder. You can use
to benchmark a single result or multiple results.
run-test.sh will benchmark all
x86_64 files in the
results folder plus the handcoded .s files in the test folder.
If you are on a different architecture, let's say PPC for instance, you could
run a single PPC result file with
For each file the tester will print a line like this:
66 is the number of bytes used by the machine language code. The next
three values are the user value from
time -p for three runs of the benchmark
that walked the "hit" path. The other three are for the "miss" path.
Read above-mentioned article for a commentary and interpretation of it all.