<f[x]>
and I get consistently original code and for loop 5 times slower than recursion
<f[x]>
at this step I've got no more time to dig further
<f[x]>
kept the asm to investigate
chambart has quit [Ping timeout: 252 seconds]
<mcstar>
yeah, i meant the asm
<mcstar>
if something struck you
<mcstar>
well, thanks all for the attention
<f[x]>
btw -inline also doesn't give me speedup but it makes asm harder to search
<mcstar>
f[x]: btw, what is your platform?
<f[x]>
x86_64, 3.12.1, debian testing
mort___ has joined #ocaml
Fnar has quit [Ping timeout: 246 seconds]
Fnar has joined #ocaml
Fnar has quit [Changing host]
Fnar has joined #ocaml
_andre has joined #ocaml
mfp has quit [Read error: Connection reset by peer]
chambart has joined #ocaml
mfp has joined #ocaml
chambart has quit [Ping timeout: 244 seconds]
eni has joined #ocaml
avsm has quit [Quit: Leaving.]
chambart has joined #ocaml
eni has quit [Quit: Leaving]
chambart has quit [Ping timeout: 248 seconds]
chambart has joined #ocaml
chambart has quit [Ping timeout: 248 seconds]
chambart has joined #ocaml
avsm has joined #ocaml
mort___ has quit [Quit: Leaving.]
sepp2k1 has joined #ocaml
sepp2k has quit [Ping timeout: 265 seconds]
mmajchrzak has quit [Ping timeout: 265 seconds]
gnuvince has quit [Ping timeout: 250 seconds]
sepp2k1 has quit [Read error: Connection reset by peer]
zorun has quit [Ping timeout: 246 seconds]
Anarchos has joined #ocaml
smondet has joined #ocaml
gnuvince has joined #ocaml
Ninju has quit [Ping timeout: 240 seconds]
thizanne has joined #ocaml
Ninju has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
Ninju1 has joined #ocaml
Ninju has quit [Ping timeout: 248 seconds]
mika1 has quit [Quit: Leaving.]
zorun has joined #ocaml
ankit9 has joined #ocaml
<f[x]>
mcstar, indeed, 3.12.1 with -g would box float ref used in a loop. It is fixed in 4.00
<mcstar>
f[x]: how come you didnt experience a difference?
<f[x]>
I do see a difference on a small example
<f[x]>
maybe on a bigger example this optimization didn't kick in due to something else
silver has quit [Read error: Connection reset by peer]
<mcstar>
f[x]: these other standard libs, like janestreet, or batteries, would make a difference in performance?
ankit9 has quit [Quit: Leaving]
<mcstar>
im just asking in what way are they better?
<thelema_>
mcstar: not on a function that doesn't use them
<thelema_>
mcstar: they offer lots of convenience
<f[x]>
what thelema_ says
<mcstar>
do they replace arrays?
* f[x]
afk
<thelema_>
they offer replacements, but don't replace standard arrays
<thelema_>
for example, batteries has Vect, which stores array elements in a tree structure for fast concat, insert, etc.
<mcstar>
o.O
<thelema_>
And core has a resizable array
<mcstar>
why call it a vect
<thelema_>
mcstar: that's what the original author called it - "Rope" and "Vect"
<thelema_>
rope for strings, vect for arrays of arbitrary types
<mcstar>
ok, so these libs provide convenience, but not performance enhacement
<thelema_>
well, there's certainly possible performance enhancements if you're doing lots of appends to large arrays.
<thelema_>
but they're algorithmic performance enhancements, not faster implementations of stdlib functions
<thelema_>
(although both offer tail recursive versions of the stdlib functions that aren't, so that you don't accidentally blow your stack.)
<mcstar>
thats good news
<thelema_>
the reason they don't do this is that the builtin implementations are already damn efficient.
<thelema_>
so there's no room for improvement.
<mcstar>
wrt what?
<mcstar>
ok, just nitpicking
tumdum has quit [Disconnected by services]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
robthebob has quit [Quit: Leaving]
avsm has quit [Quit: Leaving.]
Znudzon has quit [Remote host closed the connection]
zorun has quit [Ping timeout: 252 seconds]
djcoin has quit [Quit: WeeChat 0.3.2]
fds has quit [Ping timeout: 248 seconds]
joelr has joined #ocaml
<joelr>
good day
Xizor has joined #ocaml
joelr has quit [Quit: joelr]
pangoafk is now known as pango
jaar has quit [Ping timeout: 248 seconds]
beckerb has quit [Ping timeout: 245 seconds]
smondet has quit [Read error: Connection reset by peer]
ulfdoz has joined #ocaml
ulfdoz has quit [Ping timeout: 246 seconds]
thomasga has quit [Quit: Leaving.]
smondet has joined #ocaml
eni has joined #ocaml
ocp has joined #ocaml
<Ninju1>
Hi, I need to package SDL libs with my app so I can distribute a binary to my client but I haven't had any luck with it. Does anyone know the right flags to use because I don't seem to be making any progress since adriens help yesterday.
<adrien>
well, you're trying to run the binary and failing I guess? which error message do you get?
<Ninju1>
hold on a sec, im running it on my other machine to test
<Ninju1>
bsaically it says "dyld: Library not loaded: /usr/local/lib/libSDL-1.2.0.dylib"
<Ninju1>
thats the error i've pretty much got for everything i've tried
<Ninju1>
I have the sdl libs in ./lib/sdl and the .so files in ./lib/so relative to my project
<Ninju1>
but everything i've tried to get it to look there hasn't worked
<Ninju1>
and im now compiling with ocamlopt instead of ocamlc btw
ousado_ has joined #ocaml
pheredhel has joined #ocaml
wormphle1m has joined #ocaml
dgfitch_ has joined #ocaml
<thelema_>
Ninju1: by the "dyld", I guess that you're running on mac, right?
snarkyboojum_ has joined #ocaml
taruti_ has joined #ocaml
strlen_ has joined #ocaml
eni has quit [Ping timeout: 240 seconds]
beckerb has joined #ocaml
peddie_ has joined #ocaml
<Ninju1>
thelema_: yep thats right
cdidd has quit [*.net *.split]
snarkyboojum has quit [*.net *.split]
lopex has quit [*.net *.split]
ssbr has quit [*.net *.split]
pheredhel` has quit [*.net *.split]
wormphlegm has quit [*.net *.split]
peddie has quit [*.net *.split]
jave has quit [*.net *.split]
strlen has quit [*.net *.split]
ousado has quit [*.net *.split]
dgfitch has quit [*.net *.split]
adrien has quit [*.net *.split]
taruti has quit [*.net *.split]
peddie_ is now known as peddie
ssbr- has joined #ocaml
jave has joined #ocaml
eikke has quit [Ping timeout: 250 seconds]
<thelema_>
Ninju1: the output suggests to me that you're not actually statically linking libSDL into your executable
<thelema_>
you say that you have the libs in ./lib/*, but why would the system's dynamic linker look there?
adrien has joined #ocaml
<Ninju1>
yeah exactly - failing to link them statically i was hoping to try and link them dynamically instead and send them with the build, but I can't get either method working
cdidd has joined #ocaml
<mcstar>
putting them next to the binary might work
<Ninju1>
can't hurt to try
<Ninju1>
i'll let you know in a sec
<mcstar>
(thats how i deployed something on linux/windows)
ousado_ is now known as ousado
ousado has quit [Changing host]
ousado has joined #ocaml
lopex has joined #ocaml
<mcstar>
i read as a strong point of ocaml that you can statically link anything with your binary
<mcstar>
though, im not sure how is that different from the usual static linking
<thelema_>
bool prompt_yn(string prompt) {
<Ninju1>
I'm sure you can, but I'm not sure what I'm doing wrong because I've tried so many different things to try and get this working
<thelema_>
}
<thelema_>
int atoi(string s) { return atoi(s.c_str()); }
<thelema_>
maybe section 18.1.3 from the manual will help
<Ninju1>
i believe `sdl-config —static-libs` returns the flags you need to link sdl statically but even managing to get that into the compile command didnt work
<Ninju1>
I read that earlier actually :-/
<Ninju1>
i'll do it again in case I missed something i guess
<thelema_>
so you're using the native code compiler and putting the libSDL.so files on the command line?
<mcstar>
Ninju1: so it didnt work to put the libs beside the binary?
<Ninju1>
mcstar: nope just did that and it didn't work any better (same error as previous)
strlen_ is now known as strlen
<adrien>
Ninju1: well, the ocaml code is linked statically, as it is by default
<Ninju1>
native code compiler and im not sure how to link the .so files but I've tried lots of different things
<adrien>
the C one isn't
<thelema_>
what's the command you're using to produce your executable?
<thelema_>
you may need a -ccopt -lSDL
<Ninju1>
one sec
<adrien>
I *think* you can *maybe* link the .dylib as static if you also have a .la file with a similar name
<mcstar>
$LD_LIBRARY_PATH
<mcstar>
$DYLD_LIBRARY_PATH
<mcstar>
The process’s working directory
<mcstar>
$DYLD_FALLBACK_LIBRARY_PATH
<mcstar>
thats the dlopen search priority on osx
<Ninju1>
its hard to give you the command because obviously I've had so many different ones (during the process of trying to get this to work), so I guess you could call this the base (where i haven't got anything in Makefile that tries to include the files in my lib dir)