Core.Time.Map splitting and performance

"Johan Mazel [email protected] [ocaml_beginners]" <[email protected]> Tue, 24 May 2016 11:59:09 +0900
Newsgroups gmane.comp.lang.ocaml.beginners
Message-ID <CAKS5mhSGU7MOpTaCVNmGan5tCxcD5odcjZooNAbV=aY-t-gf7Q@mail.gmail.com>
Hello
I am trying to build a very big (100k to 1M elements) map of Core.Time.t
that contains some data.
I then want to repeatedly split it (to extract time windows).
I use the Core.Time.Map.split function.

Using perf to profile the execution, it appears that most of the time is
actually spent in Core_kernel.Core_map.length.
You can try with the code I attached.

I took a quick look at the core_kernel code on Github but I couldn't find
an explanation.
Is there any explanation for this ? Tree balancing ?

Thank you for your time.
Regards,
Johan


[Non-text portions of this message have been removed]