Browse thread
Objective Caml 2.02
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Xavier Leroy <Xavier.Leroy@i...> |
| Subject: | Re: Upgrade from OCaml 2.01 to OCaml 2.02 made things _slower_! |
> After I upgraded OCaml & Camlp4 from 2.01 to 2.02, our the native code > of our program became much smaller (5124462 instead of 7219378), but it > also became a little slower (1.5% - 3.5% for various inputs). Do you > have an idea what could have caused it? In the past, I've observed speed variations by at least +/- 5% caused exclusively by minor variations in code placement (such as adding or deleting instructions that are never executed). Almost any modification in the code generator affects code placement. If only for this reason, speed variations of less than 5% are essentially meaningless: there's no way to attribute them to a particular otpimization or to good/bad luck in code placement. (Makes you very suspicious of those PLDI papers where they report 1% speedups...) > Also, I was doing some performance mesurements (using P6 performance > counter support patches for Linux by Erik Hendriks - > http://beowulf.gsfc.nasa.gov/software/ ) when I upgraded, so I have some > information (and can get more of it) on the performance counters for my > program under both 2.01 and 2.02. In particular, the number of requests > from the processor to the L1 data cache became 2%-3% bigger. That's more meaningful. The two new optimizations in 2.02 (closed toplevel functions and allocation coalescing) should reduce the number of memory accesses. Allocation coalescing might increase register pressure locally, causing other stuff to be spilled on the stack, though. Is there any way you could get a per-function profile of memory requests? (like on the Alpha with the Digital Unix tools). - Xavier Leroy