views:

65

answers:

1

I'd like to write a sandbox virtual machine for executing a compiled program. How do you think: which of these two languages would be better to use if we consider performance? Or maybe you suggest another one?

+1  A: 

The performance of your VM will be much more affected by how you implement it rather in what language. If you implement it the same way in c# and c++ the performance will be comparable.

The thing that speaks in favor of c++ is that you can execute parts of the native code from your sandboxed application directly. It is possible to do the same in c#, but that requires some translation and emitting corresponding byte code with Reflection.Emit.

Albin Sunnanbo