Banana changed the topic of #ocaml to: OCaml 3.08.1 available! | Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
<mrvn> What does mlton do with floats in records? Still unboxed?
smimou has quit ["?"]
<mrvn> And I wonder how good ocaml does with small vectors of floats. They would be unboxed in an float array too.
<Nutssh> What are you doing?
<mrvn> reading backlog.
<Nutssh> Ah.
<Nutssh> My rule is only worry if a profile says that its a problem, and you need extra performance.
<mrvn> For a fractal program boxed floats are a huge problem.
<mrvn> Esspecialy if the compiler does never unbox them even in a while loop.
<mrvn> (like on alpha)
<Nutssh> I'd still go by the profiler.
Lemmih_ has joined #ocaml
Lemmih has quit [Read error: 110 (Connection timed out)]
<Nutssh> Last program, probability processing on social networks. I saved 10% by switching from lists to arrays. Then I saved ~20% by switching to a specialized (non-polymorphic) sort function, and another 50% by streamlining one critical loop.
TheDracle has joined #ocaml
<Nutssh> All of which was profile-directed. More importantly, now I know I have no real hotspots left.
<Nutssh> (I use a combination of ocamlopt -p and oprofile)
Tarka has joined #ocaml
Tarka has quit ["BitchX: the cure for the common client"]
monochrom has quit ["hello"]
<avlondono> g'night, good bye, see ya, hasta la vista, I'll be back, but hello?
<mrvn> Nutssh: while(n < maxiter) { double nx = x*x-y*y+cx; y = 2*x*y+cy; x = nx; ++n; }
<mrvn> Nutssh: That loop takes 99.99999999999999999999999% of the time and is just way way slower in ocaml.
<mrvn> (n < maxiter && x*x+y*y < bailout)
<mrvn> For fractals like the Mandelbrot it is pretty clear where the cpu time ends up.
<Nutssh> *nods*
<mrvn> In ocaml on alpha the compiler doesn't unbox the nx, x, y, cx, cy and doesn#t keep them in registers. That means it reads it from ram, unboxes it, puts it into the fpu, does one operation and then the full in reverse.
<Nutssh> *nods*
<avlondono> Nutssh: too bad to write that only loop in c?
<avlondono> ehm mrvn I mean
<mrvn> No, that works fine. It's ok to call it once per pixel and let it loop a million times.
<mrvn> It's just that the compiler should optimize that just as well as gcc does, except for unrolling.
<avlondono> it will never do that, the compiler doesn't have enough people working on it and brains adding stuff.
<avlondono> and it's not the priority neither (I think so)
<Nutssh> ocamlopt's compiler doesn't do much other than dead code elimination. It doesn't even remove redundant operations.. In 'let f x = x*x*x*x', it will untag 'x' 4 times.
<mrvn> avlondono: It seems to do a much better job on i386.
<avlondono> it doesn't do a better job. otherwise it would beat gcc or the intel compiler. but it doesn't indeed.
<avlondono> of course, we are willing to pay some performance for having correct programs more mantainable.
<Nutssh> I considered adding on a loop invariant code motion and a redundancy elimination pass (value numbering), but the IL wasn't well suited or well documented for a quick implementation. You can always work on the compiler if ocaml performance is important to you.
<avlondono> yep, I don't have time to do it now, although it would be nice. But the number of people interested on it between gcc and ocaml is just flat not comparable.
<mrvn> I compared the asm code and the i386 code is better for floats.
<mellum> Nutssh: is it SSA or something similar?
gim_ is now known as gim
<Nutssh> No. Its expression trees, then linearized into an RTL.
<Nutssh> Because it is expression trees, value numbering, an *easy* way to get rid of redundancy doesn't easily work. VN replaces redundant computations with copies. But there are no temporaries to copy unless a prepass is done to break the program into individual operations.
<Nutssh> Loop invariant code motion has to apply before the closure-generation and tail-recursion generation pass. Which is close to the front end.
CosmicRay has joined #ocaml
<Smerdyakov> avlondono, if you want an optimizing compiler, use MLton.
yangsx has joined #ocaml
kinners has joined #ocaml
CosmicRay has quit ["Client exiting"]
yangsx has left #ocaml []
CosmicRay has joined #ocaml
rhar has quit ["Leaving"]
gim has quit ["dodo"]
<mrvn> Smerdyakov: If you can give me one for amd64.
Hanji has quit ["[self sleep:nil];"]
<mellum> mrvn: port it yourself. Ought to be fun :)
blugleblogle has quit [Remote closed the connection]
vezenchio has joined #ocaml
kinners has quit ["leaving"]
Herrchen_ has joined #ocaml
Herrchen has quit [Read error: 110 (Connection timed out)]
mrsolo has joined #ocaml
Lemmih_ is now known as Lemmih
Herrchen_ has quit [Read error: 110 (Connection timed out)]
_fab has joined #ocaml
kinners has joined #ocaml
mrsolo_ has joined #ocaml
smimou has joined #ocaml
mrsolo has quit [Read error: 113 (No route to host)]
Submarine has joined #ocaml
mrsolo_ has quit [Read error: 104 (Connection reset by peer)]
mrsolo_ has joined #ocaml
Submarine has quit ["Leaving"]
Submarine has joined #ocaml
Submarine has quit ["Leaving"]
gim has joined #ocaml
mrsolo_ has quit ["Leaving"]
kinners has quit ["leaving"]
gim_ has joined #ocaml
gim has quit [Connection timed out]
mlh has quit ["who are you people and what are you doing in my computer?!"]
srv_ has joined #ocaml
srv has quit [Read error: 104 (Connection reset by peer)]
blugleblogle has joined #ocaml
srv_ is now known as srv
Thunfisch has joined #ocaml
pango has quit ["bbl"]
pango has joined #ocaml
Submarine has joined #ocaml
Submarine_ has joined #ocaml
Submarine_ has left #ocaml []
bacam has quit ["I want my UTF-8."]
Thunfisch has left #ocaml []
avn has quit [Remote closed the connection]
avn has joined #ocaml
avn has quit [Remote closed the connection]
senko has joined #ocaml
Submarine has quit ["Leaving"]
gim_ is now known as gim
Submarine has joined #ocaml
gebner has joined #ocaml
GreyLensman has joined #ocaml
gim has quit [Read error: 113 (No route to host)]
gim_ has joined #ocaml
cmeme has quit [SendQ exceeded]
cmeme has joined #ocaml
dxlvi has joined #ocaml
oracle1 has quit [Ping timeout: 14400 seconds]
GreyLensman has quit ["Leaving"]
cmeme has quit [Connection reset by peer]
cmeme has joined #ocaml
pango has quit ["bbl"]
_fab has quit [Read error: 113 (No route to host)]
pango has joined #ocaml
mrsolo has joined #ocaml
oracle1 has joined #ocaml
mlh has joined #ocaml
ne1 has joined #ocaml
<mflux> hmh, xemacs' tuareg mode seems to have trouble with C-c C-t, it says "Wrong type argument: number-char-or-marker-p, nil"
<mflux> it however displays the type fine in the caml-types window
<mellum> caml-types window? How does one get that?
<mflux> I accidently found it ;)
<mflux> I may have enabled it by giving universal argument to C-c C-t with C-u..
<mellum> Hm, that does nothing for me.
<mflux> and you've checked you don't have buffer '*caml-types*' around?
<mflux> I did visit the caml-mode too while trying to figure out that problem
<oracle1> I hope camlclipse is making some new release soon :)
<oracle1> it just seems to be stalled..
tautologico has joined #ocaml
det has quit [Remote closed the connection]
<mflux> hmh.. sometimes it would be nice if streams weren't destructive
* Submarine uses the default caml-mode
<mflux> well I switched only because of font coloring, and then I learned (infact from you) that the default mode too has some better colors ;)
<Smerdyakov> Yeah, I wonder why that isn't on by default.
<mflux> well, too much multimedia causes cancer. must be it.
<Submarine> (require 'caml-font)
<mflux> I think tuareg also has slightly better indentation
<mflux> especially structure like ( try\n... is indented nicer
<mflux> otoh I don't like its indentation of let a = 42 in\n<non-let-code>, but I suppose that's mainly what I've learned from the default caml-mode
<mflux> and I think it should be possible to adjust that but I haven't bothered ;)
smimram has joined #ocaml
smimou has quit [Read error: 110 (Connection timed out)]
smimram is now known as smimou
CosmicRay has quit ["Leaving"]
mrvn_ has joined #ocaml
<mflux> oh yeah, another annoyance in tuareg mode: the way it hilights stuff by selecting it sometimes annoys
mrvn has quit [Read error: 110 (Connection timed out)]
mlh has quit [Client Quit]
gim__ has joined #ocaml
gim_ has quit [Read error: 110 (Connection timed out)]
bourbaki has joined #ocaml
vezenchio has quit ["smile, Rakka ..."]
bourbaki has left #ocaml []
tautologico has quit ["Leaving"]
GreyLensman has joined #ocaml
Submarine has quit ["Leaving"]
gim_ has joined #ocaml
gim__ has quit [Read error: 110 (Connection timed out)]
det has joined #ocaml
budjet has joined #ocaml
clog has joined #ocaml