You may know that several of us have been hard at work stamping out invalidations as a way of reducing Julia’s latency. Kristoffer Carlsson and I thought it might be fun to have a contest to do the opposite: see who can come up with truly horrendous methods that obliterate almost everything . There are no prizes other than the fame and glory that come with impressing your colleagues at your devilishness.
For those who haven’t read the blog post, very briefly the goal is to come up with a method definition that would force Julia to recompile a bunch of already-compiled code. Generally, this means creating a method that is more specific than the one that got compiled in. You can read about how you measure invalidations here.
when we verify your submission, we’ll start from a fresh Julia session that’s only loading SnoopCompileCore: no cheating by loading a lot of other packages and invalidating their methods, too.
scoring will be based solely on length(uinvalidated(invalidations))
you’re allowed to define new structs, but your submission rests on the number of invalidations triggered by a single method definition.
we will award separate prizes for “non-pirating” and “pirating” method definitions. (See definition of type piracy.)
For context, a fresh Julia session contains about 48,000 MethodInstances. See how many of them you can obliterate!
You should add phase 2, where in the week after submissions are due, you get 10 points per competitor method that you can get to not cause invalidations by improving base.
I think we just need to add that. So, call it official: week 2 is “sabotage week”! Undermine your competitors by submitting a PR (doesn’t yet have to be accepted) to Julia or its standard libraries that prevents their submission from taking the trophy! We’ll offer recognition on Friday, Oct 9 for the person who most reduced the number of invalidations of one of the official submissions.
This one is only for the non-pirating submissions (there’s nothing you can do about the pirating ones).
Just post here? Does that seem fair? First to post a solution gets the credit…we’ll make a subjective decision about things that are too close to count as novel.
If that doesn’t seem fair, I’m open to alternatives…but I thought it would be kind of fun to marvel at the submissions as they roll in.
Slight problem: the method for measuring invalidations only works on 1.6-DEV which isn’t released, so the rules of the contest seem to be impossible to meet.
The only way to improve on this is to make a type that can store hyper-real numbers efficiently so you can get a bigger infinity (assuming Inf is aleph null)