Multi-shot continuations gone forever?

I just tried out a multicont-based Sequential Monte Carlo (SMC) implementation versus a CPS-based implementation on a basic Kalman filter example.

In a nutshell, SMC works by iteratively updating a family of weighted continuations by dropping low-weight ones and cloning high-weight ones.

In the example, inference runs in 12.0 seconds for the CPS implementation and in 12.8 seconds for the multicont-based one. As can be witnessed, the multicont-based implementation is massively simpler. I love it. Thanks @dhil!

(side note: at the time of writing, you will need to opam pin add gsl git@github.com:Octachron/gsl-ocaml.git\#OCaml5_compatibility in order to compile the dagger-multicont branch)

6 Likes