During my profiling of my slow Mac, it became clear that CNF was causing
real slowdowns with its many many malloc of very small strings (presumably
in all the C to fortran wrappers we are generating).
as a heads up I'm investigating replacing the malloc/free in PSX and CNF
with calls to the Boehm-Demers-Weiser Garbage Collector.
(http://www.hpl.hp.com/personal/Hans_Boehm/gc/). It will be a conditional
compile of course.
I'm not touching AST... (yet :-)
If this works then we may need to consider changing all the bare
mallocs/frees into macroed malloc/free (the free() will slow things down
in the garbage collector) so that we can switch the malloc in or out at
build time for everything. That's a while off yet. I think that "fixing"
CNF/PSX (and AST) will help a lot since they are the main malloc/free
culprits. [it helps that all the fortran goes through PSX_]
Please shout now if someone has tried it before and decided it doesn't
help....
--
Tim Jenness
JAC software
http://www.jach.hawaii.edu/~timj
|