I’ve done some very preliminary benchmarking on the inliner I’ve been hacking
into Rubinius.
For the very simple case it can handle so far—guaranteed dispatch to self,
fixed number of arguments (no splats or defaults), no blocks—here’s what we get
for 10m iterations of a simple function calling another simple function:
| name |
user |
system |
total |
real |
| uninlined-no-args |
22.49 |
0 |
22.49 |
22.49 |
| inlined-no-args |
21.74 |
0 |
21.74 |
21.74 |
| uninlined-4-args |
27.74 |
0 |
27.74 |
27.74 |
| inlined-4-args |
24.59 |
0 |
24.59 |
24.59 |
So inlining results in a 3.5% speedup on method dispatch with no arguments, and
a 12.8% speedup when there are four arguments.
Of course this is the very optimal case for the inliner. Guaranteed dispatch to
self means that I don’t even add any guard code, which would definitely slow
things down. But this actually is a fairly common case that occurs whenever you
use self accessors and any helper functions that don’t have blocks or varargs.
And the real boost of inlining, presumably, is going to be in conjunction with
JIT, since the CPU can pipeline the heck out of everything.
For the past few years I’ve done something silly with my email: I’ve
accepted email for every address at masanjin.net, and then
filtered them for spam before display. This means that, as far as any
spammer is concerned, every email address they tried to send to
masanjin.net was a direct hit. So there’s been a snowball effect:
everything they tried worked, and those addresses stayed on their lists,
and every variant they tried worked, and made it to the lists, etc.
Of course I didn’t see most of it, but it all made the trip from spammer
to mail server and over fetchmail to my poor home computer, which would
have spamassassin crank for 20 minutes every, oh, 25 minutes or so.
I’ve finally changed to a sane situation wich my mail server on a VPS
and exim4 calling spamassassin at accept time. I’ve also set up a bunch
of rules for which email addresses I accept. (Just any old string
doesn’t cut it any more.)
The result: over the past 9 days I’ve rejected 209,605 emails as spam.
That’s about 16.17 a minute, or a little more than one every 4 seconds.
How many have I accepted? Including false negatives, 2441, or one every
5 minutes. (I am on several high-volume mailinglists.)
That’s a S/N ratio of 1.16%!
Hopefully as time goes by, the rejections will start trimming addresses
off spammers’ lists, and that will improve somewhat. Until then… at
least it’s not my home computer doing the work any more.
Managing that old Hobix blog was way more work than it should’ve been. So,
I’ve started over and outsourced the work to someone else. Let’s see how it
goes. [It didn’t go so well. Hence, Whisper.—ed.]