Dirk Eddelbuettel: littler is faster at doing nothing!
With yesterday's announcement of littler 0.2.0, I kept thinking about a few not-so-frequently-asked but recurring questions about littler. And an obvious one if of course the relationship to Rscript.
As we have pointed out before, littler preceded Rscript. Now, with Rscript being present in every R installation, it is of course by now more widely known.
But there is one important aspect which I stressed once or twice in the past and which bears repeating. Due to the lean and mean way in which littler is designed and set-up, it actually starts a lot faster than either Rscript or R. How, you ask? Well we actually query the environement at build time and hardcode a number of settings which R and Rscript re-acquire and learn each time they start. Which is more flexible. But slower.
So consider the following, really simple example. In it, we create a simple worker function f which launches the given (and simplest possible) R command of just quitting 250 times (by launching a shell command which loops). We then let littler, Rscript and R (in its just execute this expression mode) run this, and time it via one of the common benchmarking packages.
R> library(rbenchmark)
R> f <- function(cmd) system(paste0("bash -c \"for i in \\$(seq 1 250); do ", cmd, " -e 'q()'; done\""));
R> res <- benchmark(f("r"), f("Rscript"), f("R --slave"), replications=5, order="relative")
R> res
test replications elapsed relative user.self sys.self user.child sys.child
1 f("r") 5 32.256 1.000 0.001 0.004 26.538 5.706
2 f("Rscript") 5 180.154 5.585 0.001 0.004 152.751 28.522
3 f("R --slave") 5 302.714 9.385 0.001 0.004 270.569 33.098
R>
So there: littler does "nothing" about five times as fast as Rscript, and about nine times as fast as R. Not that this matters greatly -- but when you design something for repeated (unsupervised) execution, say in a cronjob, it might as well be lightweight.
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
This is my monthly summary of my free software related activities. If you re among the people who
45 today. I should stop being childish, but I don't wanna.
Howdy y all
Two of the main things I ve been working on since I started at Xamarin are making it easier for people to try out the latest bleeding-edge Mono, and making it easier for people on older distributions to upgrade Mono without upgrading their entire OS.
Public Jenkins packages
Every time anyone commits to Mono git master or MonoDevelop git master, our
= Driving your firefox like vim
Recently a friend of mine pointed out
Ren Mayorga reported Debian
I was staring at qemu source for a while last month. There's a lot of things that I don't understand about the codebase.
There's a race but it's hard to tell why a SIGSEGV was received.
Today we have a little diversion to talk about the National Health Service. The NHS is the publicly funded healthcare system in the UK.
After an intensive evening of brainstorming by the 5th floor cabal, I am happy to release the very first version of the Debian Trivia, modeled after the famous
Recently I was doing some work on the alioth infrastructure like fixing things or cleaning up things.
One of the more visible things I done was the switch from gitweb to
Modern web applications are much more complicated than the simple Perl CGI
scripts or PHP pages of the past. They usually start with a framework and
include lots of external components both on the front-end and on the back-end.
Here's an example from the Node.js back-end of a
I m writing this blog post on the plane from Portland towards Europe (
For the past decade or so, I wasn't exactly happy. I struggled with low self esteem, likely bordered on depression at times. I disappointed friends, family and most of all, myself. There were times I not only disliked the person I was, but hated it. This wasn't healthy, nor forward-looking, I knew that all along, and that made the situation even worse. I tried to maintain a more enthusiastic mask, pretended that nothing's wrong. Being fully aware that there actually is nothing terribly wrong, while still feeling worthless, just added insult to injury.In the past few years, things started to improve. I had a job, things to care about, things to feel passionate about, people around me who knew nothing about the shadows on my heart, yet still smiled, still supported me. But years of self loathing does not disappear overnight.Then one day, some six months ago, my world turned upside down. Years of disappointment, hate and loathing - poof, gone. Today, I'm happy. This is something I have not been able to tell myself in all honesty in this century yet (except maybe for very brief periods of time, when I was happy for someone else).
A little over six months ago, I met someone, someone I could open up to. I still remember the first hour, where we talked about our own shortcomings and bad habits. At the end of the day, when She ordered me a crazy-pancake (a pancake with half a dozen random fillings), I felt happy. She is everything I could ever wish for, and more. She isn't just the woman I love, with whom I'll say the words in a couple of months. She's much more than a partner, a friend a soul-mate combined in one person. She is my inspiration, my role model and my Guardian Angel too.I no longer feel worthless, nor inadequate. I am disappointed with myself no more. I do not hate, I do not loathe, and past mistakes, past feelings seem so far away! I can share everything with Her, She does not judge, nor condemn: she supports and helps. With Her, I am happy. With Her, I am who I wanted myself to be. With Her, I am complete.Thank You.
If you ve noticed your chrome/chromium on Linux having problems since you
upgraded to somewhere around version 35/36, you re not alone. Thankfully,
it s relatively easy to workaround. It will hit people who keep their
browser open for a long time, or who have lots of tabs (or if you re like
me, and do both).
To tell if you re suffering from this particular problem, crack open your