mfp changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.11.2 released | Inscription for OCaml Meeting 2010 is opened http://wiki.cocan.org/events/europe/ocamlmeetingparis2010
boscop has quit []
ikaros has quit [Quit: Leave the magic to Houdini]
Associat0r has quit [Ping timeout: 245 seconds]
MrEvil has quit [Quit: This computer has gone to sleep]
<hcarty> adrien: ping
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
cgrubb has quit [Quit: cgrubb]
jakedouglas has joined #ocaml
pad has quit [Read error: Connection reset by peer]
valross has joined #ocaml
Morphous has quit [Ping timeout: 260 seconds]
elehack has joined #ocaml
<elehack> thelema, yes, VERSION can be removed from the Makefile.
enthymeme has joined #ocaml
cgrubb has joined #ocaml
Morphous has joined #ocaml
elehack has quit [Quit: Goodbye...]
<thelema> drat, missed him.
onigiri_ has joined #ocaml
onigiri__ has quit [Ping timeout: 265 seconds]
joewilliams_away is now known as joewilliams
sshc has quit [Ping timeout: 260 seconds]
thrasibule has quit [Read error: Connection reset by peer]
thrasibule has joined #ocaml
goomba has quit []
thrasibule has quit [Ping timeout: 248 seconds]
sshc has joined #ocaml
sshc has quit [Read error: Connection reset by peer]
sshc has joined #ocaml
sshc has quit [Read error: Connection reset by peer]
sshc has joined #ocaml
cgrubb has quit [Quit: cgrubb]
drk-sd has joined #ocaml
drk-sd has quit [Client Quit]
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
ftrvxmtrx has quit [Quit: Leaving]
enthymeme has joined #ocaml
ulfdoz has quit [Ping timeout: 240 seconds]
ttamttam has joined #ocaml
ygrek has joined #ocaml
ftrvxmtrx has joined #ocaml
onigiri_ has quit [*.net *.split]
Shoggoth has quit [*.net *.split]
Mr_Awesome has quit [*.net *.split]
det has quit [*.net *.split]
diml has quit [*.net *.split]
onigiri_ has joined #ocaml
Shoggoth has joined #ocaml
Mr_Awesome has joined #ocaml
det has joined #ocaml
diml has joined #ocaml
spearalot has joined #ocaml
enthymeme has quit [Quit: sleeeep!]
Yoric has joined #ocaml
ikaros has joined #ocaml
itewsh has joined #ocaml
jonafan_ has joined #ocaml
jonafan has quit [Ping timeout: 240 seconds]
ygrek has quit [Ping timeout: 245 seconds]
th5 has joined #ocaml
ygrek has joined #ocaml
thelema_ has joined #ocaml
flx_ has joined #ocaml
eb8490 has joined #ocaml
ikaros has quit [Read error: Operation timed out]
noj_ has joined #ocaml
TaXules_ has joined #ocaml
hugin_ has joined #ocaml
haelix_ has joined #ocaml
_nejimban has joined #ocaml
_zack_ has joined #ocaml
flux has quit [*.net *.split]
mbishop has quit [*.net *.split]
_zack has quit [*.net *.split]
thelema has quit [*.net *.split]
TaXules has quit [*.net *.split]
noj has quit [*.net *.split]
haelix has quit [*.net *.split]
hugin has quit [*.net *.split]
nejimban has quit [*.net *.split]
flx_ is now known as flux
kaustuv has joined #ocaml
valross has quit [Quit: Ex-Chat]
mbishop has joined #ocaml
<kaustuv> What's the difference between otherlibs/threads and otherlibs/systhreads?
munga_ has joined #ocaml
itewsh has quit [Ping timeout: 264 seconds]
clog has quit [Ping timeout: 276 seconds]
clog has joined #ocaml
spearalot has quit [Quit: Computer has gone to sleep]
pimmhogeling has joined #ocaml
thelema_ has quit [Read error: Connection reset by peer]
thelema has joined #ocaml
_nejimban has quit [Ping timeout: 264 seconds]
itewsh has joined #ocaml
nejimban has joined #ocaml
_th5 has joined #ocaml
th5 has quit [Ping timeout: 240 seconds]
_th5 is now known as th5
onigiri__ has joined #ocaml
onigiri_ has quit [Ping timeout: 265 seconds]
_andre has joined #ocaml
krankkatze has quit [Remote host closed the connection]
eb8490 has quit [Ping timeout: 265 seconds]
boscop has joined #ocaml
spearalot has joined #ocaml
<thelema> kaustuv: systhreads = green threads vs. threads = posix threads
thrasibule has joined #ocaml
<f[x]> thelema, actually other way round
<mehdid> but for OCaml, systhreads=threads and threads=vmthreads :)
<mehdid> and indeed, vmthreads are obviously green threads (like their name says)
<kaustuv> If I use ocamlopt -threads, does it automagically pick systhreads instead of threads?
hugin_ has left #ocaml []
hugin has joined #ocaml
<kaustuv> err, -thread not -threads
<kaustuv> I guess I'm asking what "threads.cma" refers to in the two following incantations:
<kaustuv> ocamlc -thread threads.cma
<kaustuv> ocamlc -vmthread threads.cma
<adrien> it's systhreads by default afaik
<adrien> * VM-level threads. This implementation performs time-sharing and context switching at the level of the OCaml virtual machine (bytecode interpreter). It is available on Unix systems, and supports only bytecode programs. It cannot be used with native-code programs.
ygrek has quit [Ping timeout: 245 seconds]
ygrek has joined #ocaml
Shoggoth has quit [Quit: Ex-Chat]
avsm has joined #ocaml
ikaros has joined #ocaml
drk-sd has joined #ocaml
cgrubb has joined #ocaml
Shoggoth has joined #ocaml
ttamttam has quit [Quit: Leaving.]
avsm has quit [Ping timeout: 276 seconds]
<thelema> (* When one link an OCaml library/binary/package, one should use -linkpkg *)
<thelema> flag ["ocaml"; "link"] & A"-linkpkg";
<thelema> Is this correct? I had to add the flag "program" to this to keep it from using -linkpkg when building a .cmxa (for instance)
avsm has joined #ocaml
<kaustuv> Yeah, you shouldn't use -linkpkg to make a .cmxa
<thelema> I guess my question is whether you need -linkpkg for linking anything other than programs
<hcarty> thelema: '&' has the downside of conflicting with JoCaml
<hcarty> (to dig up an old conversation)
<thelema> hcarty: ah, thanks.
<gildor> thelema: the generated myocamlbuild in OASIS use flag ["ocaml"; "link"; "program"] & A"-linkpkg";
<thelema> good. I'll fix the ocamlbuild wiki.
sepp2k has joined #ocaml
th5 has quit [Quit: th5]
fraggle_laptop has quit [Quit: Quitte]
ccasin has joined #ocaml
derdon has joined #ocaml
fraggle_laptop has joined #ocaml
lokydor has joined #ocaml
spearalot has quit [Quit: Computer has gone to sleep]
cgrubb has quit [Quit: cgrubb]
fraggle_laptop has quit [Quit: Quitte]
ftrvxmtrx has quit [Remote host closed the connection]
lokydor has quit [Quit: Lost terminal]
avsm has quit [Quit: Leaving.]
<kaustuv> A silly test, but it proves that the new module sugar in 3.12 has noticable runtime costs: http://ocaml.pastebin.com/Ugr5f33B
<kaustuv> If you tweak it by making the opened module bigger, the differences in the three numbers widens.
munga_ has quit [Ping timeout: 260 seconds]
<adrien> kaustuv: you mean t0, t1, t2?
<kaustuv> err, right
<kaustuv> but the numbers are accurate
Associat0r has joined #ocaml
<adrien> can you try with 200_000_000 instead?
<adrien> Xavier Leroy mentionned they had some cost but said they had managed to implement them without the cost being too expensive
* adrien slaps himself
Associat0r has quit [Client Quit]
<thelema> test2 is the fastest? hmm, I worry about this benchmark
Yoric has quit [Quit: Yoric]
<adrien> kaustuv: you'll also probably want to turn cpu power savings (downclocking) off during the benchmark
<thelema> <- paper on benchmarking, showing 300% differences in clock cycles based on irrelevant environment variables
<adrien> hahaha, nice title ;-)
<kaustuv> More serious attempt. The difference is mostly noise, even though it is measurable: http://ocaml.pastebin.com/W8M6TJTW
<kaustuv> erk, test3 is wrong there. Never mind about that one.
<thelema> heh. very fast test3. It's as if it doesn't even get run. :)
<kaustuv> ocamlopt is soo good at optimizing, it even removes useless stuff from the source
<thelema> lol
<adrien> heheh ;p
<adrien> and with n = 10_000_000_000 ?
<kaustuv> weird as hell:
<kaustuv> % ./a 10_000_000_000
<kaustuv> t0 = 18.24138
<kaustuv> t1 = 18.27454
itewsh has quit [Ping timeout: 240 seconds]
<kaustuv> t2 = 18.20533
<kaustuv> t3 = 18.22475
<thelema> I call measurement error
<kaustuv> I no longer trust this "benchmark"
<adrien> maybe the call is actually optimized
* thelema says post the assembly
<adrien> try putting the module in a hashtable and then get it again
<kaustuv> ah, right, let me try without inlining
<kaustuv> more promising...
<kaustuv> % ./a 10_000_000_000
<kaustuv> t0 = 32.43549
<kaustuv> t1 = 32.50754
<kaustuv> t2 = 32.45647
<kaustuv> t3 = 18.79810
Asmadeus has quit [Ping timeout: 268 seconds]
ftrvxmtrx has joined #ocaml
<kaustuv> The assembly for test0,1,2 is virtually identical. I guess I fail at experimental fieldwork
avsm has joined #ocaml
<thelema> pastebin the assembly?
<thelema> if you read the paper I linked to, you'd know that "benchmarking is hard" and that we should just go shopping instead
<adrien> yeah, benchmarking is horribly hard
<adrien> and benchmarking is only valid under one specific environment
<adrien> so, wrapped in a full program, it might give completely different results
<thelema> spin0 == spin1
<thelema> == spin2
<thelema> spin3 has the + inlined, so is different
<kaustuv> yep
<thelema> the assembly might be cleaner w/0 -g
ftrvxmtrx has quit [Quit: Leaving]
ftrvxmtrx has joined #ocaml
cgrubb has joined #ocaml
<kaustuv> Putting it in a hashtable has interesting and more consistent results...
<adrien> indeed...
* adrien wonders if it would be possible to estimate the cost per call for this benchmark
pimmhogeling has quit [Remote host closed the connection]
<hcarty> That's a little disappointing. I guess 3.12's M.(...) won't effectively replace pa-do for simple calculations.
<hcarty> I was hoping for a magical "no performance hit" outcome.
<mfp> there's no inlining with M.( ... ) ?
<kaustuv> mfp: no, there is. I have inlining turned off and am tricking the system further by hiding the modules in a hash table
<kaustuv> So this is an absurdly unlikely situation
<kaustuv> In the most natural form there appears to be no measurable difference between an outermost let open M in and M.() as needed
<mfp> read too much from hcarty's observation
<mfp> the "open X in ..." extension did a cheap syntactic transformation that resulted in extra allocation for a local module
<adrien> /win 11
<mfp> but I'd expect let open M in ... f x and M.(... f x) to have essentially no runtime cost compared to a direct call w/ M.f x
<adrien> blarg...
<mfp> *no extra cost, even
* mfp recompiles ocaml
lokydor has joined #ocaml
<kaustuv> Right, the question is whether in practice there is a difference between: let open M in (... f x ... f x) -- and -- (... M.(f x) ... M.(f x)), and the answer is yes, assuming M is not statically known
<kaustuv> I've retried with inlining turned on and it doesn't affect the outcome. The crucial element is knowing the module statically
<kaustuv> (As one would expect)
<kaustuv> Actually, I take that back completely. ocamlc -dlambda shows that test0,1,2 have the same lambda form. I am now thoroughly mystified.
<thelema> repeat after me: "benchmarking is hard"
<orbitz> hah
<kaustuv> I think I'm more likely to believe "kaustiv is stupid" than that
Asmadeus has joined #ocaml
<kaustuv> I can't even spell my own name right
<thelema> could be page alignment issues
fremo__ has joined #ocaml
jonafan_ is now known as jonafan
<kaustuv> Probably. I am going to start using M.(...) with wild abandon now since it is such a great feature.
<orbitz> is that an extension?
<orbitz> pa_do or soemthign?
<thelema> 3.12
<orbitz> awesome
<kaustuv> For one thing, I finally have a nice way to deal with multiple records with the same fields, since I can now do M.({a = blah ; b = bleh}) instead of {M.a = blah ; M.b = bleh}
<orbitz> yeah much cleaner
<thelema> kaustuv: actually, you could always do {M.a = blah; b=bleh}
<hcarty> kaustuv: You can pre-3.12 do {M.a = ...; b = ...}
<orbitz> yeah he said 'isntead of'
<thelema> umm, note the single M. in our examples
<orbitz> ohhh sorry
<kaustuv> Sorry, that was a bad example. A better one would be M.(foo.a + foo.b) instead of foo.M.a + foo.M.b
<thelema> yes.
<hcarty> The addition of {x; y} meaning {x = x; y = y} looks like it will be nice when working with records
<thelema> I like that one too.
<orbitz> what is that?
<hcarty> orbitz: In 3.12 you can create a record value with let x = ... in let y = ... in {x; y}
<thelema> shorter syntax for record binding
<adrien> hcarty: I still had to write { x = x; y = y } earlier this week, I almost died ;-)
<adrien> can't wait =)
<kaustuv> adrien: svn co 3.12 already
<kaustuv> All the cool kids are doing it!
<hcarty> The horrors of peer pressure and trunk use.
<adrien> kaustuv: beat you: I can git clone it :P
<adrien> it's like cool dipped in coolness :-)
<hcarty> kaustuv: Thank you very much for talking about these tests. They are both useful and interesting.
<adrien> yup, definitely, that was something I was really expecting
thieusoai has joined #ocaml
Submarine has joined #ocaml
thieusoai has quit [Quit: Leaving]
Submarine has quit [Ping timeout: 240 seconds]
kaustuv has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
smimou has quit [Ping timeout: 246 seconds]
smimou has joined #ocaml
TaXules_ has left #ocaml []
_unK has joined #ocaml
ikaros_ has joined #ocaml
ikaros has quit [Ping timeout: 240 seconds]
avsm has quit [Ping timeout: 240 seconds]
Submarine has joined #ocaml
enthymeme has joined #ocaml
thieusoai has joined #ocaml
maskd has joined #ocaml
Associat0r has joined #ocaml
avsm has joined #ocaml
pad has joined #ocaml
ttamttam has joined #ocaml
onigiri_ has joined #ocaml
lokydor has quit [Quit: Lost terminal]
onigiri__ has quit [Ping timeout: 265 seconds]
ccasin has quit [Quit: Leaving]
alpounet has left #ocaml []
thieusoai has quit [Quit: Leaving]
Submarine has quit [Quit: Leaving]
ttamttam has quit [Quit: Leaving.]
onigiri__ has joined #ocaml
maattd has quit [Ping timeout: 264 seconds]
onigiri_ has quit [Ping timeout: 246 seconds]
_andre has quit [Quit: get the wire]
ygrek has quit [Ping timeout: 245 seconds]
itewsh has joined #ocaml
maattd has joined #ocaml
smimou has quit [Ping timeout: 246 seconds]
smimou has joined #ocaml
pad has quit [Remote host closed the connection]
fraggle_ has quit [Ping timeout: 276 seconds]
fraggle_ has joined #ocaml
pad has joined #ocaml
pad has quit [Remote host closed the connection]
pad has joined #ocaml
maskd has quit [Quit: leaving]
pad has quit [Remote host closed the connection]
derdon has quit [Ping timeout: 246 seconds]
thieusoai has joined #ocaml
cgrubb has quit [Quit: cgrubb]
sepp2k has quit [Quit: Leaving.]
thrasibule_ has joined #ocaml
thrasibule has quit [Ping timeout: 268 seconds]
goomba has joined #ocaml
komar_ has quit [Quit: WeeChat 0.2.6]
itewsh has quit [Quit: Quitte]
_unK has quit [Ping timeout: 260 seconds]
_unK has joined #ocaml
ikaros_ has quit [Quit: Leave the magic to Houdini]
maskd has joined #ocaml
avsm1 has joined #ocaml
avsm has quit [Ping timeout: 265 seconds]
maskd has quit [Read error: Connection reset by peer]
maskd has joined #ocaml
maskd has quit [Quit: leaving]
M| has joined #ocaml