[ocaml-platform] An alternative proposal for namespaces

Leo White lpw25 at cam.ac.uk
Wed Mar 20 21:15:58 GMT 2013


>> (I'm not too convinced by the efficiency argument ("calling an
>> external program ..."): mapping files are also not a terribly
>> efficient way to provide information for lookups. In the OCaml-land, a
>> marshalled hashtable or Map could be fairly more efficient for
>> example.)
>
> I'm pretty sure that the difference between parsing a simple text file and loading/unmarshaling a binary hashtable is
> negligible compared to spawning a new process, at least under Windows.  And we are talking about doing it once for each
> file for which dependencies need to be computed *and* for each .mlpath file.  There will be a huge slowdown if the
> resolution algorithm suggested by Leo had to be implemented in omake.  

As I have said many times, the resolution algorithm won't have to be
implemented in omake. I only provided it to show that it could be
implemented if the maintainers of omake insisted on using "ocamldep
-modules" instead of regular ocamldep with generated search path files.

> Note that "ocamldep" would also itself be a
> little bit slower since it would have to access many directories (or do many Sys.file_exists) in addition to reading
> .mlpath files, instead of just reading .mlpath files.

As I have made clear, the build system shouldn't give ocamldep directories, it
should generate a search path file to represent the eventual contents of
those directories and give that file to ocamldep.


More information about the Platform mailing list