companion_cube changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.05.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.05/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
SpiceGuid has quit [Quit: ChatZilla 0.9.92 [SeaMonkey 2.46/20161213183751]]
jbrown has quit [Ping timeout: 252 seconds]
nullifidian has quit [Read error: Connection reset by peer]
nullifidian has joined #ocaml
Associat0r_ has quit [Read error: Connection reset by peer]
snhmib has quit [Quit: WeeChat 1.9.1]
shinnya has joined #ocaml
mfp has quit [Ping timeout: 260 seconds]
jao has quit [Ping timeout: 260 seconds]
enterprisey has joined #ocaml
nullifidian has quit [Read error: Connection reset by peer]
nullifidian_ has joined #ocaml
nullifidian_ has quit [Read error: Connection reset by peer]
nullifidian__ has joined #ocaml
pierpa has quit [Quit: Page closed]
nullifidian__ has quit [Read error: Connection reset by peer]
nullifidian__ has joined #ocaml
zmt00 has quit [Read error: Connection reset by peer]
zmt00 has joined #ocaml
zmt00 has quit [Remote host closed the connection]
zmt00 has joined #ocaml
zmt00 has quit [Remote host closed the connection]
zmt00 has joined #ocaml
ziyourenxiang has quit [Ping timeout: 248 seconds]
Soni has quit [Ping timeout: 240 seconds]
alexelcu has quit [Remote host closed the connection]
alexelcu has joined #ocaml
bombastus has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
govg has joined #ocaml
samrat_ has joined #ocaml
_whitelogger has joined #ocaml
samrat_ has quit [Ping timeout: 240 seconds]
ziyourenxiang has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
lgd has quit [Remote host closed the connection]
lgd_ has joined #ocaml
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0_ has joined #ocaml
infinity0 has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
zmt00 has quit [Quit: Leaving]
samrat_ has joined #ocaml
slash^ has joined #ocaml
enterprisey has quit [Remote host closed the connection]
ziyourenxiang has quit [Ping timeout: 240 seconds]
enterprisey has joined #ocaml
cbot has quit [Quit: Leaving]
Simn has joined #ocaml
enterprisey has quit [Remote host closed the connection]
SomeDamnBody has joined #ocaml
leah2 has quit [Ping timeout: 240 seconds]
<SomeDamnBody> Does anybody know how much time or how expensive to call out to C code in ocaml?
cyraxjoe has quit [K-Lined]
cyraxjoe has joined #ocaml
leah2 has joined #ocaml
argent_smith has joined #ocaml
mk9 has joined #ocaml
mfp has joined #ocaml
mnemem_ has quit [Ping timeout: 258 seconds]
<flux> somedamnbody, you could benchmark it, you know.. ;-)
<flux> my understanding is "not very expensive"; even less so if the external function is marked as "noalloc"
<SomeDamnBody> flux: Yeah. Well right now I think that calls out to C are a substantial cost. But I don't know why. I think it has to do with either the wrapping function or the trip from the ocaml runtime to the c++ code
<flux> and perhaps more so if the external function releases the ocaml gc lock; I assume this uses a mutex
<SomeDamnBody> flux: it's certainly not noalloc
snhmib has joined #ocaml
<flux> somedamnbody, soo I did a benchmark
<flux> an empty C function taking unit argument is 31.56 ns for ocamlc and 6.02 ns for ocamlopt
<flux> not a stupidly long time I think :-)
<flux> ("bench" seems pretty cool)
_whitelogger has joined #ocaml
<SomeDamnBody> Thanks flux!
<SomeDamnBody> I found the issue of my error was a large complexity case. Searching for something in an array.
jonasen has joined #ocaml
<flux> somedamnbody, no problem. now I know the number as well :)
mk9 has quit [Quit: mk9]
<flux> ah, should try the no-alloc and gc lock release cases as well
zolk3ri has joined #ocaml
<def`> foo_nogc_noalloc (4.65 ns) is 24.9% faster than foo_gc_onearg (6.20 ns)
samrat_ has quit [Ping timeout: 248 seconds]
ziyourenxiang has joined #ocaml
mk9 has joined #ocaml
<def`> foo_threadsafe_noalloc (14.86 ns) which is 8.7% faster than foo_threadsafe (16.27 ns)
mk9 has quit [Client Quit]
<def`> so, with these measures, noalloc is 25% faster, locking/unlocking is 240% slower
kakadu has joined #ocaml
<def`> hmm, and that was with the single threaded runtime. With pthread runtime it is 1000% slower (67ns)
arj has joined #ocaml
snhmib has quit [Ping timeout: 255 seconds]
luukAntwerp has quit [Ping timeout: 252 seconds]
<flux> hmm, I wonder how I'm not getting any significant difference with any of those cases..
kakadu_ has joined #ocaml
<def`> though the benchmark has a significant overhead, if I make 1000 calls to the C function, and benchmark that loop, I get 1.6ns per no-alloc call
kakadu has quit [Ping timeout: 260 seconds]
<def`> benchmarking "ignore" gives 2.8ns per call, subtracting ignore duration from foo_noalloc duration gives back 1.6ns per call
<def`> so it is more relevant to compare values if you use "ignore" as a baseline
<flux> seems the package hasn't been updated since 2013. would be nice if that would be built in.
<def`> :), at the same time, you shouldn't draw to much conclusions from a call that does (almost) nothing
<def`> the results are highly sensitive to noise and hardware doing magic
<flux> well isn't that the point of bench, evaluate it enough times to understand how much noise there is? though I guess it doesn't work great with these kind of super-micro benchmarks
nullifidian__ is now known as nullifidian
kakadu_ has quit []
fraggle_ has quit [Remote host closed the connection]
luukAntwerp has joined #ocaml
<flux> soo, has anyone compared ocaml-format aginst ocpindent? is there a functional difference between them?
<Drup> flux: one indent, the other formats, that's not really the same thing
<flux> ah, so ocaml-format does complete reformatting then?
Soni has joined #ocaml
<zolk3ri> flux: can I have a link to ocaml-format please?
<zolk3ri> oh
<zolk3ri> thanks!
<flux> oops, infer is just a tool using it
pyx has joined #ocaml
pyx has quit [Client Quit]
<Drup> (also, ocamlformat is probably very alpha at this point :D)
fraggle_ has joined #ocaml
mnemem_ has joined #ocaml
mnemem_ has quit [Read error: Connection reset by peer]
mnemem_ has joined #ocaml
<Leonidas> I remember someone pointing at odd formatting in the ocamlformat source code which is a bit ironic ;-)
samrat_ has joined #ocaml
luukAntwerp has quit [Remote host closed the connection]
luukAntwerp has joined #ocaml
andreas__ has joined #ocaml
arj has quit [Quit: Leaving.]
mnemem_ has quit [Read error: Connection reset by peer]
mnemem_ has joined #ocaml
jnavila has joined #ocaml
cthuluh has quit [Remote host closed the connection]
mayhew has joined #ocaml
jnavila has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
jnavila has joined #ocaml
govg has quit [Ping timeout: 252 seconds]
samrat_ has quit [Ping timeout: 252 seconds]
zolk3ri has quit [Ping timeout: 260 seconds]
zolk3ri has joined #ocaml
shinnya has quit [Ping timeout: 248 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
zolk3ri has quit [Ping timeout: 255 seconds]
zolk3ri has joined #ocaml
nullifidian has quit [Quit: Leaving]
arj has joined #ocaml
arj is now known as yezariaely
nullifidian has joined #ocaml
samrat_ has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 258 seconds]
zmt00 has joined #ocaml
yezariaely has quit [Quit: Leaving.]
FreeBirdLjj has joined #ocaml
richi235 has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
richi235 has joined #ocaml
jnavila has quit [Read error: No route to host]
jnavila has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
jnavila has joined #ocaml
jnavila has quit [Client Quit]
jnavila has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
jnavila has joined #ocaml
mnemem_ has quit [Ping timeout: 240 seconds]
gacepa has joined #ocaml
andreas__ has quit [Quit: Connection closed for inactivity]
kerrhau has quit [Ping timeout: 260 seconds]
slash^ has quit [Read error: Connection reset by peer]
mnemem_ has joined #ocaml
webshinra has quit [Remote host closed the connection]
webshinra has joined #ocaml
ziyourenxiang has quit [Ping timeout: 258 seconds]
kerrhau has joined #ocaml
kerrhau has quit [Changing host]
kerrhau has joined #ocaml
kakadu has joined #ocaml
kakadu has quit [Remote host closed the connection]
jbrown has joined #ocaml
kakadu_ has joined #ocaml
Simn has quit [Ping timeout: 255 seconds]
kakadu_ has quit [Ping timeout: 248 seconds]
kakadu has joined #ocaml
mk9 has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Ping timeout: 248 seconds]
mnemem_ has quit [Ping timeout: 248 seconds]
andreas__ has joined #ocaml
jnavila has joined #ocaml
gacepa has quit [Quit: Connection closed for inactivity]
arj has joined #ocaml
Simn has joined #ocaml
arj has quit [Read error: Connection reset by peer]
arj has joined #ocaml
regnat[m] has quit [Ping timeout: 240 seconds]
timclassic has quit [Ping timeout: 248 seconds]
smondet[m] has quit [Ping timeout: 252 seconds]
multiocracy[m] has quit [Ping timeout: 240 seconds]
mnemem_ has joined #ocaml
M-jimt has quit [Ping timeout: 240 seconds]
nadako[m] has quit [Ping timeout: 248 seconds]
drsmkl[m] has quit [Ping timeout: 276 seconds]
samrat[m] has quit [Ping timeout: 264 seconds]
isaachodes[m] has quit [Ping timeout: 252 seconds]
aspiwack[m] has quit [Ping timeout: 252 seconds]
M-martinklepsch has quit [Ping timeout: 246 seconds]
srenatus has quit [Ping timeout: 246 seconds]
rgr[m] has quit [Ping timeout: 255 seconds]
copy` has quit [Ping timeout: 276 seconds]
Bluddy[m] has quit [Ping timeout: 252 seconds]
hdurer[m] has quit [Ping timeout: 255 seconds]
peddie[m] has quit [Ping timeout: 246 seconds]
M-ErkkiSeppl has quit [Ping timeout: 240 seconds]
equalunique[m] has quit [Ping timeout: 255 seconds]
orbifx[m] has quit [Ping timeout: 240 seconds]
yetanotherion[m] has quit [Ping timeout: 276 seconds]
aantron has quit [Ping timeout: 276 seconds]
nkhodyunya has quit [Ping timeout: 255 seconds]
samrat_ has quit [Ping timeout: 240 seconds]
mnemem_ has quit [Quit: WeeChat 1.9.1]
ayxih has joined #ocaml
arj has quit [Quit: Leaving.]
nadako[m] has joined #ocaml
Bluddy[m] has joined #ocaml
hdurer[m] has joined #ocaml
equalunique[m] has joined #ocaml
M-martinklepsch has joined #ocaml
drsmkl[m] has joined #ocaml
aspiwack[m] has joined #ocaml
peddie[m] has joined #ocaml
aantron has joined #ocaml
M-jimt has joined #ocaml
smondet[m] has joined #ocaml
timclassic has joined #ocaml
srenatus has joined #ocaml
samrat[m] has joined #ocaml
multiocracy[m] has joined #ocaml
regnat[m] has joined #ocaml
rgr[m] has joined #ocaml
isaachodes[m] has joined #ocaml
yetanotherion[m] has joined #ocaml
M-ErkkiSeppl has joined #ocaml
orbifx[m] has joined #ocaml
copy` has joined #ocaml
nkhodyunya has joined #ocaml
kakadu has quit [Ping timeout: 246 seconds]
kakadu has joined #ocaml
pierpa has joined #ocaml
jonasen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jnavila has quit [Ping timeout: 264 seconds]
cthuluh_ has joined #ocaml
jbrown has quit [Read error: Connection reset by peer]
jnavila has joined #ocaml
jbrown has joined #ocaml
jbrown has quit [Ping timeout: 258 seconds]
jnavila has quit [Remote host closed the connection]
Nephe has quit [Ping timeout: 252 seconds]
enterprisey has joined #ocaml
jao has joined #ocaml
mk9 has quit [Quit: mk9]
mayhew has quit [Quit: WeeChat 1.6]
argent_smith has quit [Quit: Leaving.]
ayxih has quit [Quit: Leaving]
Mazen has joined #ocaml
Simn has quit [Ping timeout: 240 seconds]
Mazen has quit [Quit: Leaving]
Mazen has joined #ocaml
Mazen has quit [Read error: Connection reset by peer]
SomeDamnBody has quit [Remote host closed the connection]
Nephe has joined #ocaml
Nephe has quit [Client Quit]
Nephe has joined #ocaml
enterprisey has quit [Ping timeout: 240 seconds]
zolk3ri has quit [Quit: Lost terminal]
cthuluh_ is now known as cthuluh
_whitelogger has joined #ocaml
enterprisey has joined #ocaml