Re:OxCaml - a set of extensions to the OCaml programming lan...
by dmkolobov on Friday June 13, 2025 @12:45PM
(#44270103)
Is that really a viable solution for a timeframe of 6+ hours?
[ Parent
| on HN ]
Re:OxCaml - a set of extensions to the OCaml programming lan...
by jitl on Friday June 13, 2025 @12:52PM
(#44270177)
Sure, if you know how much you allocate per minute (and don’t exceed your budget) you just buy enough RAM and it’s fine.
Re:OxCaml - a set of extensions to the OCaml programming lan...
by ackfoobar on Friday June 13, 2025 @01:49PM
(#44270591)
This will decrease performance because of reduced locality. Maybe increased jitter because of TLB misses.
Re:OxCaml - a set of extensions to the OCaml programming lan...
by jitl on Friday June 13, 2025 @09:31PM
(#44273594)
Compared to what, running a garbage collector?
Re:OxCaml - a set of extensions to the OCaml programming lan...
by dmkolobov on Saturday June 14, 2025 @02:04AM
(#44274533)
Probably? Locality becomes fairly important at scale. That’s why there’s a strong preference for array-based data structures in high-performance code.
If I was them I’d be using OCaml to build up functional “kernels” which could be run in a way that requires zero allocation. Then you dispatch requests to these kernels and let the fast modern generational GC clean up the minor cost of dispatching: most of the work happens in the zero-allocation kernels.
Re:OxCaml - a set of extensions to the OCaml programming lan...
by CyberDildonics on Saturday June 14, 2025 @10:26PM
(#44280133)
No, compared to not doing so many allocations that freeing them is time consuming or expensive. Having allocations slow a program down means that there are way too many, probably due to being too granular and being in a hot loop. On top of that it means everything is a pointer and that lack of locality will slow things down even further. The difference between allocating many millions of objects and chasing their pointers and doing a single allocation of a vector and running through that can easily be 100x faster.
Re:OxCaml - a set of extensions to the OCaml programming lan...
by mayoff on Friday June 13, 2025 @01:22PM
(#44270385)
(this comment was off topic, sorry)
Re:OxCaml - a set of extensions to the OCaml programming lan...
by robertlagrant on Friday June 13, 2025 @01:43PM
(#44270538)
Is this relevant to OCaml?
Re:OxCaml - a set of extensions to the OCaml programming lan...
by mayoff on Friday June 13, 2025 @02:12PM
(#44270784)
ha ha oops I got confused
Re:OxCaml - a set of extensions to the OCaml programming lan...
by spooneybarger on Friday June 13, 2025 @02:03PM
(#44270711)
Yes. It is a very common design pattern within banks for systems that only need to run during market hours.
Re:OxCaml - a set of extensions to the OCaml programming lan...
by iainctduncan on Friday June 13, 2025 @02:54PM
(#44271179)
I talk about doing this in an audio context and get met with raised eyebrows, I'd love some references on others doing it, if anyone can share!
Re:OxCaml - a set of extensions to the OCaml programming lan...
by logicchains on Friday June 13, 2025 @12:52PM
(#44270169)
You can just add more RAM until it is viable.
Re:OxCaml - a set of extensions to the OCaml programming lan...
by mardifoufs on Friday June 13, 2025 @07:57PM
(#44273275)
I think it is, but to be clear I think (from my very limited experience, just a couple of years before leaving finance, and the people with more experience that I've talked with) that c++ is still a lot more common than any GC language (typically java, since OCaml is even rarer). So it is possible, and some firms seem to take that approach, but I'm not sure exactly how besides turning off GC or very specific GC tuning.
Here is a JVM project I saw a few years back, I'm not sure how successful the creators are but they seem to use it in actual production. It's super rare to get even a glimpse at HFT infra from the outside so it's still useful.