From: "Christoph Höger" <christoph.hoeger@tu-berlin.de>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Compile-time performance problem
Date: Tue, 8 Nov 2016 09:56:33 +0100 [thread overview]
Message-ID: <e5ec0d87-28b6-70df-6c3b-46172bff8344@tu-berlin.de> (raw)
In-Reply-To: <f825e85d-23a0-3e99-d056-fc941ca228c0@tu-berlin.de>
[-- Attachment #1.1.1: Type: text/plain, Size: 1849 bytes --]
I must correct myself. Version 4.04.0 does not fix the issue, just move
it slightly. It seems 4.04.0 is faster by at least a constant factor,
but asymptotically still problematic (see attachment).
The file compiles just fine to bytecode, but takes 20s to compile to
machine code.
Does anyone have a clue whether I run into a bug or if there is a
compiler pass that is non-linear in some metric of the code-size?
Am 07.11.2016 um 18:32 schrieb Christoph Höger:
> Hi Nicolas,
>
> no, AFAIK 4.03.0 does not enable flambda by default. The 4.04beta2 I
> tried had a 4.04beta2+flambda right next to it, so I assume it also does
> not have flambda enabled.
>
> regards,
>
> Christoph
>
> Am 07.11.2016 um 18:18 schrieb Nicolas Ojeda Bar:
>> Hi Christoph,
>>
>> Are you using flambda ?
>>
>> - Nicolas
>>
>> 2016-11-07 18:07 GMT+01:00 Christoph Höger
>> <christoph.hoeger@tu-berlin.de <mailto:christoph.hoeger@tu-berlin.de>>:
>>
>> I just checked with 4.04beta2 and could not reproduce the problem. So it
>> seems to be a 4.03.0 bug, but I could not find anything obviously
>> related in the 4.04 changelog.
>>
>> --
>> Christoph Höger
>>
>> Technische Universität Berlin
>> Fakultät IV - Elektrotechnik und Informatik
>> Übersetzerbau und Programmiersprachen
>>
>> Sekr. TEL12-2, Ernst-Reuter-Platz 7, 10587 Berlin
>>
>> Tel.: +49 (30) 314-24890 <tel:%2B49%20%2830%29%20314-24890>
>> E-Mail: christoph.hoeger@tu-berlin.de
>> <mailto:christoph.hoeger@tu-berlin.de>
>>
>>
>
>
--
Christoph Höger
Technische Universität Berlin
Fakultät IV - Elektrotechnik und Informatik
Übersetzerbau und Programmiersprachen
Sekr. TEL12-2, Ernst-Reuter-Platz 7, 10587 Berlin
Tel.: +49 (30) 314-24890
E-Mail: christoph.hoeger@tu-berlin.de
[-- Attachment #1.1.2: perf.ml --]
[-- Type: text/plain, Size: 7602 bytes --]
let (<+) a v = Array.append a [|v|]
let foo k s =
((fun k -> fun s -> (k#_continue_ (object (self) end)) 1)
(object (self)
val _continue_ =
fun x ->
(fun k ->
fun s ->
((fun k -> fun s -> (k#_continue_ (object (self) end)) 2)
(object (self)
val _continue_ =
fun x ->
(fun k ->
fun s ->
((fun k -> fun s -> (k#_continue_ (object (self) end)) 3)
(object (self)
val _continue_ =
fun x ->
(fun k ->
fun s ->
((fun k -> fun s -> (k#_continue_ (object (self) end)) 4)
(object (self)
val _continue_ =
fun x ->
(fun k ->
fun s ->
((fun k -> fun s -> (k#_continue_ (object (self) end)) 5)
(object (self)
val _continue_ =
fun x ->
(fun k ->
fun s ->
((fun k -> fun s -> (k#_continue_ (object (self) end)) 6)
(object (self)
val _continue_ =
fun x ->
(fun k ->
fun s ->
((fun k -> fun s -> (k#_continue_ (object (self) end)) 7)
(object (self)
val _continue_ =
fun x ->
(fun k ->
fun s ->
((fun k -> fun s -> (k#_continue_ (object (self) end)) 9)
(object (self)
val _continue_ =
fun x ->
(fun k ->
fun s ->
((fun k -> fun s -> (k#_continue_ (object (self) end)) 10)
(object (self)
val _continue_ =
fun x ->
(fun k ->
fun s ->
((fun k -> fun s -> (k#_continue_ (object (self) end)) 11)
(object (self)
val _continue_ =
fun x ->
(fun k ->
fun s ->
((fun k -> fun s -> (k#_continue_ (object (self) end)) 12)
(object (self)
val _continue_ = fun x -> (fun k -> fun s -> (k#_continue_ (object (self) end)) 13) k
method with__continue_ x = {<_continue_ = x>}
method _continue_ = _continue_
end)) s) k
method with__continue_ x = {<_continue_ = x>}
method _continue_ = _continue_
end)) s) k
method with__continue_ x = {<_continue_ = x>}
method _continue_ = _continue_
end)) s) k
method with__continue_ x = {<_continue_ = x>}
method _continue_ = _continue_
end)) s) k
method with__continue_ x = {<_continue_ = x>}
method _continue_ = _continue_
end)) s) k
method with__continue_ x = {<_continue_ = x>}
method _continue_ = _continue_
end)) s) k
method with__continue_ x = {<_continue_ = x>}
method _continue_ = _continue_
end)) s) k
method with__continue_ x = {<_continue_ = x>}
method _continue_ = _continue_
end)) s) k
method with__continue_ x = {<_continue_ = x>}
method _continue_ = _continue_
end)) s) k
method with__continue_ x = {<_continue_ = x>}
method _continue_ = _continue_
end)) s) k
method with__continue_ x = {<_continue_ = x>}
method _continue_ = _continue_
end)) s
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2016-11-08 8:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-07 17:01 Christoph Höger
2016-11-07 17:07 ` Christoph Höger
2016-11-07 17:18 ` Nicolas Ojeda Bar
2016-11-07 17:32 ` Christoph Höger
2016-11-08 8:56 ` Christoph Höger [this message]
2016-11-08 10:10 ` Goswin von Brederlow
2016-11-08 10:49 ` [Caml-list] <SPAM> " Pierre Chambart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e5ec0d87-28b6-70df-6c3b-46172bff8344@tu-berlin.de \
--to=christoph.hoeger@tu-berlin.de \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox