<discocaml>
<froyo> through cffi you can use inline asm with the expected loss in portability and possible deminishing returns when the speedup is dwarfed by the call overhead (even when annotated with e.g. noalloc)
jabuxas has joined #ocaml
<discocaml>
<idontwantausernamefeckoff> how bad is the C ffi?
<discocaml>
<idontwantausernamefeckoff> for overhead i mean
<discocaml>
<idontwantausernamefeckoff> im using dunes stub generation atm
<discocaml>
<froyo> measure it for your own use case! pretty lightweight in general
<discocaml>
<idontwantausernamefeckoff> yeah ofc
<discocaml>
<idontwantausernamefeckoff> i’m only wrapping libcurl
<discocaml>
<froyo> idk if ocaml5 introduced more overhead, but historically ocaml runtime worked nicely with c and the c call overhead was pretty low especially with noalloc i think it becomes just like a regular function call
<discocaml>
<idontwantausernamefeckoff> which if anything the biggest performance gain would be writing it from a multi_perform based loop to listening on file descriptors inside eio
<discocaml>
<idontwantausernamefeckoff> yeah i’ve heard good things
<discocaml>
<idontwantausernamefeckoff> one of the reasons i started learning despite the small ecosystem compared to some other langs
<discocaml>
<froyo> idk if ocaml5 introduced more overhead, but historically ocaml runtime worked nicely with c and the c call overhead was pretty low especially with noalloc i think it becomes just like a regular function call. I've personally compared with haskell and go, we beat both
<discocaml>
<froyo> oops forgot edits aren't good here
<discocaml>
<froyo> sorry :')
<companion_cube>
There are already curl bindings, fyi
<discocaml>
<idontwantausernamefeckoff> companion_cube: yeah, but i wanted specifically an eio interface and a lot more proxy related options that aren’t in ocurl, and it landed up being quicker to use ctypes for the bindings than understand lots and lots of c macros
<companion_cube>
Ah I see
fweht has joined #ocaml
<companion_cube>
I mean, if you can use ocurl with lwt, you should be able to do the same for eio
<discocaml>
<idontwantausernamefeckoff> that and i wasn’t gonna use ocurl directly anyway so if all i want are the bindings ctypes makes that very simple to have as a few 20 line ml files
<discocaml>
<idontwantausernamefeckoff> yeah, you can
<companion_cube>
But missing options might be more work
<discocaml>
<idontwantausernamefeckoff> ocurl is nice, but if i’m going to write my own convenience client and async code i may as well do it in a format i’m more comfortable with
<companion_cube>
I don't get the async part, ocurl-lwt is like 30 lines :)
<companion_cube>
I'm probably biased though cause I don't like ctypes much
<discocaml>
<mbacarella> I’m taking my kid to a math festival this morning
<discocaml>
<mbacarella> I’m sure it’s going to be absolutely nothing like a math festival *I* would produce
<discocaml>
<mbacarella> but my kid might think it’s a hit just because they have a build your own tesseract with toothpicks station
<discocaml>
<mbacarella> “I can’t believe there isn’t a single LED installation of beta reduction! and what’s this? did you really just phone in cellular automata with the same tired game of life visualization? not even rule 23?!” 😤
dhil has quit [Ping timeout: 256 seconds]
dnh has joined #ocaml
rgrinberg has joined #ocaml
zanetti has joined #ocaml
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gareppa has joined #ocaml
<discocaml>
<Kali> #offtopic🎲 ?
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Anarchos has joined #ocaml
dnh has joined #ocaml
average has quit [Quit: Connection closed for inactivity]
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
waleee has joined #ocaml
zanetti has quit [Quit: zanetti]
<discocaml>
<mbacarella> ahem. as an OCaml elitist I’m expressing my anxiety over math fest barely acknowledging true mathematical power
<discocaml>
<mbacarella> there isn’t even a single booth here introducing a new concurrency library