Selecting An Embedded Language

language-agnostic, performance

Solution

Yes, tons. Lua and Python seems to be the most popular:

Embedding Lua

- http://www.lua.org/pil/24.html

- https://stackoverflow.com/questions/38338/why-is-lua-considered-a-game-language

- Lua as a general-purpose scripting language?

Embedding Python

- http://docs.python.org/extending/embedding.html

Embedding Tcl

- http://wiki.tcl.tk/3474

- http://wiki.tcl.tk/2265

Embedding Ruby

- How to embed Ruby in C++?

Embed Perl

- http://perldoc.perl.org/perlembed.html

Embed JavaScript

- http://spiderape.sourceforge.net/

There are dozens of JavaScript engines around, this is just an example. Some of them are also frighteningly quick.

Problem

I'm making an application that analyses one or more series of data using several different algorithms (agents). I came to the idea that each of these agents could be implemented as separate Python scripts which I run using either the Python C API or Boost.Python in my app. I'm a little worried about runtime overhead TBH, as I'm doing some pretty heavy duty data processing and I don't want to have to wait several minutes for each simulation. I will typically be making hundreds of thousands, if not millions, of iterations in which I invoke the external "agents"; am I better of just hardcoding everything in the app, or will the performance drop be tolerable? Also, are there any other interpreted languages I can use other than Python?

Original source

Related problems