2 ms·
Lua actually fits his criteria quite well, IMHO. It's fast, written in fully compliant ANSI C for portability, and very explicitly designed to be embedded in C
by silentbicycle 18y ago
Lua actually fits his criteria quite well, IMHO. It's fast, written in fully compliant ANSI C for portability, and very explicitly designed to be embedded in C / C++. It's also been in use in industry (such as at Petrobras, a big Brazilian oil company) for over a decade, as well as numerous games (http://www.lua.org/history.html http://www.lua.org/history.html). While the language isn't hard real-time, you can control (and just pause, or completely replace) the garbage collector.
As per the OCaml example, you could either change what C type Lua uses for its primary numeric type (it uses doubles by default) or use C userdata (a garbage-collector-managed pointer to a C struct), since the collection of numbers probably has some algorithmically relevant characteristics beyond just being a huge set of numbers.