About ChaiScript

ChaiScript is the first and only scripting language designed from the ground up with C++ compatibility and modern design in mind. It is an ECMAScript-inspired, embedded functional-like language.

ChaiScript is licensed under the BSD license.

Download

Version: 3.1.0 Released: 6/18/2011

Source (tar.bz2)
Source (zip)
Windows
Linux
MacOSX

Remove the Microsoft C++ exception

It would be nice, if all the exceptions could be removed. In each run I'm seeing about 1000 handled exceptions.

It's not possible to remove

It's not possible to remove all of the exceptions. There are some things (like function guards) which much be executed to know if they can succeed.

That said, I did take a good long look at all of the exceptions that are thrown and why, and analyzed what can be reduced. I've managed to drastically reduce the exceptions for a long running test case (contrib/codeanalysis/profile.chai) from about 32,000 to about 100. Startup now generates 86 exceptions instead of 800+.

The result of the changes means that debug mode in visual studio is significantly improved, several times faster than it was. However, release mode on gcc shows a slight performance decrease, around 2% or so, which surprises me.

I'm going to leave the changes in place since debug builds are so much better.

-Jason