[prog] Passing data between modules
Meredydd
meredydd at everybuddy.com
Tue Jul 29 13:07:28 EST 2003
On Tuesday 29 July 2003 12:26, Conor Daly wrote:
> On Mon, Jul 28, 2003 at 11:01:59PM +0100 or thereabouts, Meredydd
wrote:
> Last time we looked at dynamic libs programs (about 8 years ago), we
> ended up with a 0.25x performance hit. Whether that was down to
> inexperience or inherent difficulties in libs. We've been statically
> linking ever since. It may be time to change but we'll have to learn
> how...
Hoo boy. That's...odd. In any case, as far as I can tell, dlopen() in C
puts the lib into the same address space as the executable, so they
behave just like normal functions. But anyway, if performance matters
that much, then interpreted and bytecoded languages are *definitely*
out of the window. In any case, the overhead from serialisation,
transmission and deserialisation is certain to be much greater than
that of dynamic loading.
> Sockets are, again, something we haven't touched. How much new
> learning will be involved will again be a factor.
Not a lot. I just use a magic recipie, it's about a page of code each
for server and client sockets, after which they behave just like any
other UNIX file descriptor.
> One of the reasons for choice of language is the notion that there'll
> be a C compiler on any *NIX/ARCH we buy while there may not be
> perl/python/java. Knowing we need to train new recruits in only C and
> (c)sh is of value also. Our mission is accumulation and preservation
> of climate data. We're in this for the long haul. Use of the latest
> "fashionable" language is not necessarily the way forward...
Fair enough. Java isn't going away, though - Sun is, was and probably
will remain for some time a Very Large Company, and they've put a lot
of effort into getting people to use Java. They're not about to back
down. However, there are a good number of other reasons that have come
up (platforms other than Linux/BSD/Solaris/OSX/Windows, performance
hits, training) which mean that C does look like a better language.
One warning with recruits, though, although you almost certainly already
know this - look out for C novices! If someone has just learnt C,
especially if (s)he isn't moving up from something lower-level, you
really need to watch out for accidental clobberings, especially when
the subtleties of structure passing and serialisation start biting.
Meredydd
More information about the Programming
mailing list