Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Compilation speed of modules/functors
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jacques Carette <carette@m...>
Subject: Compilation speed of modules/functors
Are there known issues with compilation speed of heavily functorized 
code?  My code used to use a lot of records, but that was not very 
extensible, so I switched to using modules and functors.  Now the 
compilation time has gone from << 1 second to 5-6 seconds (on my slow 
laptop).  While not the end of the world, this still surprised me.  Are 
there known issues in this area?  Known pitfalls and work-arounds?

The actual codes are in MetaOCaml, but I did some experiments in pure 
Ocaml and got the same results, so it is not due to MetaOCaml (sorry, 
these are no longer available).  The curious can look at
for record-based code and
for functor-based code.