From: Nicolas C. <war...@fr...> - 2003-03-17 03:43:34
|
> > - while talking about performance, could someone do some test program for it > > ? I would like to test for example the improvement of inlining the setcdr > > I have a "beta" implementation of something like the Perl Benchmark > module: > > http://www.bagley.org/~doug/ocaml/benchmark/ > > It can help to answer such questions as: "is it faster to do it this > way or that way?" > > I've attached an example below, which indicates, as one might expect, > that inlining helps with byte code, but not so much with optimized > code. Thanks Doug, do you volunteer for further timing contests ? :-) Thanks that's what I wanted to hear. I think then we should inline such calls ( I myself like the bytecode, and you can't always easily switch to native when you're using some features like Dynlink ). Definition proposal for inlined calls : we should inline calls that does not require more than 1 or 2 easy lines of code, and are called many times. BTW, I was also wondering about the local-loop definitions against a separate-function, but since the loop is only called once, that shouldn't make even a small difference. What about the Brian's sort performances ? Nicolas Cannasse |