commonlisp has quit [Read error: Connection reset by peer]
commonlisp_ is now known as commonlisp
everyonemines has joined #ocaml
cdidd has quit [Remote host closed the connection]
NihilistDandy has joined #ocaml
lamawithonel has quit []
zorun has quit [Read error: Operation timed out]
zorun has joined #ocaml
Tobu has quit [Ping timeout: 260 seconds]
antegallya has quit [Ping timeout: 248 seconds]
Tobu has joined #ocaml
NihilistDandy has quit []
twittard has quit [Ping timeout: 244 seconds]
twittard has joined #ocaml
mdelaney has quit [Quit: mdelaney]
everyonemines has quit [Quit: Leaving.]
ulfdoz has joined #ocaml
mdelaney has joined #ocaml
twittard has quit [Remote host closed the connection]
twittard has joined #ocaml
cdidd has joined #ocaml
twittard has quit [Quit: twittard]
mdelaney has quit [Quit: mdelaney]
mdelaney has joined #ocaml
mdelaney has quit [Client Quit]
ulfdoz has quit [Ping timeout: 240 seconds]
vivanov has joined #ocaml
twittard has joined #ocaml
<vivanov>
using output_string on channels vs single_write on file descriptors -- for performance -- what is preferable ?
MaskRay has joined #ocaml
mdelaney has joined #ocaml
Drup has quit [Quit: Leaving.]
<flux>
well, output_string will do buffering, so that will be one additional copy
<flux>
if you can arrange your data to be in a big buffer without overhead, then your Unix.single_write will be faster
<flux>
do note that doing a single single_write will not be efficient in general case, you want to handle its return value and repeat the write until your data is written in full
<flux>
uh, I mean 'sufficient' not 'efficient'
int_ has joined #ocaml
otk has joined #ocaml
otk_ has quit [Ping timeout: 265 seconds]
pango is now known as pangoafk
ankit9 has joined #ocaml
Submarine__ has joined #ocaml
silver has joined #ocaml
thomasga has joined #ocaml
edwin has joined #ocaml
commonlisp has quit [Ping timeout: 252 seconds]
<vivanov>
flux: to sum up, ill be better off putting strings into a buffer, when the buffer reaches the length of say 15000, extracting the string and using Unix.single_write to write the whole thing to disk ?
ftrvxmtrx_ has joined #ocaml
abdallah has quit [Quit: Ex-Chat]
ftrvxmtrx has quit [Quit: Leaving]
djcoin has joined #ocaml
zorun has quit [Ping timeout: 245 seconds]
<flux>
vivanov, it would be best to use a 15000 character long string and write your data to that, and then write that string in a loop
ftrvxmtrx_ has quit [Quit: Leaving]
ftrvxmtrx has joined #ocaml
<adrien>
vivanov: 15000 is quite small if you want the highest throughput
ocp has joined #ocaml
avsm has joined #ocaml
zorun has joined #ocaml
MaskRay has quit [Quit: leaving]
ontologiae has joined #ocaml
<vivanov>
adrien, flux: great thx a lot
Cyanure has joined #ocaml
mdelaney has quit [Quit: mdelaney]
avsm has quit [Quit: Leaving.]
eikke has joined #ocaml
ikaros has joined #ocaml
fantasticsid has quit [Remote host closed the connection]
avsm has joined #ocaml
vivanov has quit [Quit: Lost terminal]
EmmanuelOga has quit [Quit: WeeChat 0.3.7-dev]
ankit9 has quit [Ping timeout: 252 seconds]
ikaros has quit [Quit: Ex-Chat]
antegallya has joined #ocaml
Tobu has quit [Ping timeout: 272 seconds]
antegallya has quit [Read error: Operation timed out]
ikaros has joined #ocaml
antegallya has joined #ocaml
Tobu has joined #ocaml
ankit9 has joined #ocaml
avsm has quit [Ping timeout: 244 seconds]
ankit9 has quit [Ping timeout: 272 seconds]
antegallya has quit [Ping timeout: 255 seconds]
Tobu has quit [Read error: Operation timed out]
Tobu has joined #ocaml
lusory_ has quit [Read error: Connection reset by peer]
lusory has joined #ocaml
Ptival has quit [Ping timeout: 252 seconds]
Tobu has quit [Ping timeout: 260 seconds]
antegallya has joined #ocaml
letrec has joined #ocaml
Tobu has joined #ocaml
MaskRay has joined #ocaml
MaskRay has quit [Changing host]
MaskRay has joined #ocaml
Ptival has joined #ocaml
Tobu has quit [Ping timeout: 240 seconds]
Tobu has joined #ocaml
antegallya has quit [Ping timeout: 252 seconds]
antegallya has joined #ocaml
Tobu has quit [Ping timeout: 260 seconds]
Drup has joined #ocaml
<thelema>
adrien: what order of magnitude would you suggest for a write buffer?
<flux>
I think 64k is really sufficient, bigger buffers are unlikely to give significant performance advantages
edwin has quit [Remote host closed the connection]
edwin has joined #ocaml
<adrien>
it depends on what you're writing to and which latency you want
<adrien>
when using the dd command-line tool, typically, for hard drives, I use 1MB
Tobu has joined #ocaml
<flux>
and is it significantly better than with 64k? I don't think so
<flux>
iirc it's barely faster than 4k..
delamarche has joined #ocaml
<adrien>
not to hard drives actually: to usb keys
<flux>
in any case, the block layer does already all kinds of reblocking etc
<adrien>
I can't do any test on my hard drive now: the disk is very heavily fragmented
<flux>
so the block size would affect only if you use the raw character device interface
<flux>
the interface block size is 512 bytes (or 4 kilobytes) anyway, so basically it's a matter of context switching efficiency and the overhead of a single write..
mort___ has joined #ocaml
MaskRay has quit [Quit: leaving]
commonlisp has joined #ocaml
mort___ has quit [Remote host closed the connection]
delamarche has quit [Quit: delamarche]
antegallya has quit [Quit: Leaving.]
pangoafk has quit [Ping timeout: 260 seconds]
<hcarty>
Are job postings on the main OCaml list considered acceptable? I realize that postings happen there at times, but they tend to be from established OCaml'ers like Jane St.
<hcarty>
I'm not sure if a "Perl + OCaml + MySQL" position from a not overtly OCaml company would be ok.
<adrien>
there's a mailing-list dedicated to that but I don't know if it gets used much and if it has many subscribers
<adrien>
as far as I'm concerned, I think it's not bad (quite the opposite)
Cyanure has quit [Remote host closed the connection]
<adrien>
one type is partly missing (`NewPage of ... <- the "content" is missing)
<adrien>
after that I'll use several files
<adrien>
and packs of files
<adrien>
(packs as in ocaml's packs)
<adrien>
I'm starting to think I shouldn't have tried to automate this however, even though I'll be updating the graph very often in the future :P
oriba has joined #ocaml
probst has left #ocaml []
Tobu has joined #ocaml
eikke has quit [Ping timeout: 265 seconds]
everyonemines has joined #ocaml
Associat0r has joined #ocaml
letrec has quit [Ping timeout: 260 seconds]
everyonemines has quit [Quit: Leaving.]
ulfdoz has joined #ocaml
eikke has joined #ocaml
mort___ has quit [Quit: Leaving.]
mcclurmc_ has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
ikaros has joined #ocaml
ikaros has quit [Read error: Connection reset by peer]
ikaros has joined #ocaml
djcoin has quit [Quit: WeeChat 0.3.2]
mcclurmc_ has quit [Excess Flood]
mcclurmc has joined #ocaml
int_ has quit [Ping timeout: 276 seconds]
zorun has quit [Read error: Operation timed out]
zorun has joined #ocaml
thomasga has quit [Quit: Leaving.]
pangoafk is now known as pango
twittard has quit [Quit: twittard]
NaCl has quit [Ping timeout: 276 seconds]
twittard has joined #ocaml
yroeht has quit [Ping timeout: 244 seconds]
ontologiae has quit [Ping timeout: 240 seconds]
yroeht has joined #ocaml
NaCl has joined #ocaml
NaCl has quit [Changing host]
NaCl has joined #ocaml
ocp has quit [Ping timeout: 240 seconds]
Xizor has joined #ocaml
Associat0r has quit [Quit: Associat0r]
int_ has joined #ocaml
ftrvxmtrx has joined #ocaml
mort___ has joined #ocaml
pierre_m has joined #ocaml
<pierre_m>
hi !
<thelema>
hi
<pierre_m>
there is something I don't understand with garbage collection/memory management
<thelema>
just ask
<pierre_m>
I have a .so built from an ocaml module. the module contains a ref to a (potentially quite big) datastructure used everywhere which I don't want to expose directly to the outside world
<pierre_m>
I use marshalling to save and load data
<thelema>
ok
<pierre_m>
and I have few function to read data from text file, do some computation on it, or drop it ( data.val = empty )
<pierre_m>
:=
<adrien>
let x = foo () in
<adrien>
let x = 42 in
<adrien>
Gc.whatever ...
<pierre_m>
the thing is that it seems that the first loaded data is never freed
<adrien>
rather : "let y = 42"
<adrien>
that won't be able to free x iirc
<thelema>
pierre_m: is your first loaded data still bound to an identifier?
<pierre_m>
I guess so but and can't see where
<pierre_m>
and the weird thing is that
<pierre_m>
well ok it may be not so weird
<pierre_m>
my data grow when I compute things on it
<pierre_m>
and I only manage to go back to the initial size after the load()
<thelema>
pierre_m: this is the entirety of load_trie?
<pierre_m>
and multiple call to load_trie () will result in a constant grow of memory usage
<pierre_m>
yes
<thelema>
ok, what about Unicode2.en/decoder?
<thelema>
and why the "do"?
<pierre_m>
isn't it mandatory in revised syntax ?
<thelema>
ah, I don't use revised so much.
<pierre_m>
I'm trying to get used to it
<pierre_m>
I use a confusing mixed syntax
ulfdoz has quit [Read error: Operation timed out]
djcoin has joined #ocaml
pierre_m has quit [Ping timeout: 245 seconds]
pierre_m2 has joined #ocaml
<pierre_m2>
oops
<pierre_m2>
funny thing
<pierre_m2>
if I read the data from a text file and then overwrite it with a many load ()
int_ has quit [Quit: Leaving]
<pierre_m2>
memory is still growing, but then drop () seems to erase all the data that came from load and go back to the initial size (1 read or 1 load)
<pierre_m2>
I'm afraid it may have something to do with the Ocaml/C interface
<thelema>
yes, if you're interfacing with C, it's very likely that the error is there.
ikaros has quit [Quit: Ex-Chat]
<pierre_m2>
I'll try from the toplevel
<pierre_m2>
...tomorrow, it's more than time to go !
<pierre_m2>
thanks !
pierre_m2 has quit [Quit: Page closed]
edwin has quit [Remote host closed the connection]
abdallah has joined #ocaml
<abdallah>
Which is expected to be faster, "List.fold_right" or "List.rev" followed by "List.fold_left" ?
Submarine__ has quit [Ping timeout: 252 seconds]
<thelema>
fold right, as long as your list doesn't blow the stack
<abdallah>
thanks!
<abdallah>
why is that?
<thelema>
List.rev has to allocate a ton
<abdallah>
ok, I see
<abdallah>
seems obvious after the fact...
<thelema>
:)
eikke has quit [Ping timeout: 252 seconds]
ikaros has joined #ocaml
eikke has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
<abdallah>
an (int * int) array of size n is less efficient than an int array of size n * 2, both in space and time right?
Xizor has quit [Ping timeout: 260 seconds]
ikaros has joined #ocaml
eikke has quit [Ping timeout: 244 seconds]
letrec has joined #ocaml
djcoin has quit [Quit: WeeChat 0.3.2]
Tobu has quit [Ping timeout: 272 seconds]
<mfp>
abdallah: takes twice as much space, and each access needs an extra indirection
<mfp>
also, modifying an element involves caml_modify, making it much slower