[Ilugc] .a-tip-a-day (patch - apply diffs and act as inverse of diff)

  • From: mbhangui@xxxxxxxxx (Manvendra Bhangui)
  • Date: Wed Sep 30 21:25:39 2009

On Wed, Sep 30, 2009 at 9:04 PM, Roshan Mathews <rmathews@xxxxxxxxx> wrote:

On Wed, Sep 30, 2009 at 8:51 PM, Manvendra Bhangui <mbhangui@xxxxxxxxx>
wrote:
It does have. The flexibility of writing in C is that I can further
reduce
the syscalls. It gives me so many ways to manipulate my environment. On a
server like a mail server which is processing few million mails a day,
choice between using spamassasin written in perl or using something like
bogofilter in C makes as much difference as to reduce the number of
servers
by half. In troubled economic times, each syscall counts and I cannot
explain the relief and the pride one feels when one sees on the top
screen
(/usr/bin/top), to see the load dropping, the moment you engineer
something
like this.

So you've actually done something like this in production code?

Yes.

However in most of such cases in my experience, the inefficiencies have been
due to bad coding rather than the choice of language.

Also in one case, I have not been able to beat a program written by someone
else in perl. The program happens to be a greylisting server which involves
searching a IP in a table having millions of entries. The better speed (5x)
in the perl program happens because of a better search algorithm than the
one which I am using in my C program. A good algorithm in any language can
make a huge difference and outweigh everything else.

Other related posts: