Compilable version of forward sim