|Anonymous | Login | Signup for a new account||2014-07-22 09:20 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0006389||OCaml||OCaml backend (code generation)||public||2014-05-03 15:31||2014-06-17 16:30|
|Target Version||Fixed in Version|
|Summary||0006389: [github patch] add an -opaque option to produce optimization-empty .cmx file for separate native compilation|
The intent of this option is to enable semi-separate native
compilation. Currently, when a module changes, all the modules that
depend on it need to be recompiled. Activating -opaque disables
cross-module optimization, but should let us change a module without
having to recompile all the others (although to be honest this still
have to be verified).
This would be of practical value for development cycles of project
that have (compile;test) loops: currently compilation is much slower
in native code than in bytecode, but tests can be sensibly faster in
native code. -opaque could bring the best of both worlds, with fast
compiles and rather-fast tests.
|Additional Information||Reviewers noted that the "does not recompile dependencies when implementation changes" aspect only works for build-system that are content-based rather than timestamp-based, as recompiling the .cmx will update its modification time. I think this is fine, and that changing the compilation process to please timestamp-based system is an orthogonal question that should be discussed separately.|
|I'm in favor of accepting the patch, but it would be quite good to at least verify that it fulfills its goal (e.g. with ocamlbuild or with omake default rules).|
I've done a test on LexiFi's code base. For a given source file change and build target, compilation takes 24s without -opaque and 16s with -opaque. The gain is not huge, but we also need to link many executables (and this cannot be avoided!) and omake itself takes some time to parse and evaluate OMakefiles and check timestamp/digests (about 5s).
I assume that for some other scenarios, the gain would be more important.
Gabriel: since nobody else objected to the feature and it seems harmless, I think you can commit your patch on the trunk.
|Thanks a lot! I was busy with other things and kind of left this one by the wayside. I agree that will be a nice addition.|
|2014-05-03 15:31||gasche||New Issue|
|2014-05-03 15:33||gasche||Tag Attached: github|
|2014-05-03 15:33||gasche||Tag Attached: patch|
|2014-05-04 22:21||frisch||Note Added: 0011343|
|2014-05-06 17:27||frisch||Note Added: 0011363|
|2014-05-06 17:54||gasche||Note Added: 0011364|
|2014-06-02 18:58||frisch||Relationship added||related to 0004454|
|2014-06-04 21:43||doligez||Status||new => confirmed|
|2014-06-17 16:30||frisch||Assigned To||=> gasche|
|2014-06-17 16:30||frisch||Status||confirmed => assigned|
|Copyright © 2000 - 2011 MantisBT Group|