You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 7244 Reporter: joris Assigned to:@chambart Status: closed (set by @damiendoligez on 2016-10-27T14:50:41Z) Resolution: fixed Priority: normal Severity: minor Target version: 4.04.0 +dev / +beta1 / +beta2 Fixed in version: 4.04.0 +dev / +beta1 / +beta2 Category: back end (clambda to assembly) Monitored by:@trefis@gasche@ygrek@jmeber@hcarty@Chris00
Bug description
ocamlopt + flambda needs several GB of memory to build a file with a lot of (very) large array literals. ocaml 4.02.3 uses between 4 and 5 times less memory on the same files.
The attached file is generated by ragel, a parser generator which uses arrays to store the automata.
Steps to reproduce
build attached file with ocamlopt.opt -Oclassic ragel_file.ml. On my machine it requires 3.3GB of memory at peak to complete and several minutes. (-Oclassic or -O2 or anything else doesn't actually matter, there is no function in the test file)
(note the attached file is not the full ragel output but is enough to reproduce)
After looking a bit more at that, the problem seems to come directly from the file size. There is no specific inefficiency, but the conversion to a sequence of lets makes it too big. One way to handle that may be to circumvent the let conversion by directly producing the let_symbol during closure conversion. It is quite sad to have to special case this, but I can't find any better solution.
Original bug ID: 7244
Reporter: joris
Assigned to: @chambart
Status: closed (set by @damiendoligez on 2016-10-27T14:50:41Z)
Resolution: fixed
Priority: normal
Severity: minor
Target version: 4.04.0 +dev / +beta1 / +beta2
Fixed in version: 4.04.0 +dev / +beta1 / +beta2
Category: back end (clambda to assembly)
Monitored by: @trefis @gasche @ygrek @jmeber @hcarty @Chris00
Bug description
ocamlopt + flambda needs several GB of memory to build a file with a lot of (very) large array literals. ocaml 4.02.3 uses between 4 and 5 times less memory on the same files.
The attached file is generated by ragel, a parser generator which uses arrays to store the automata.
Steps to reproduce
build attached file with ocamlopt.opt -Oclassic ragel_file.ml. On my machine it requires 3.3GB of memory at peak to complete and several minutes. (-Oclassic or -O2 or anything else doesn't actually matter, there is no function in the test file)
(note the attached file is not the full ragel output but is enough to reproduce)
File attachments
The text was updated successfully, but these errors were encountered: