These are chat archives for ChaiScript/ChaiScript

5th
May 2015
Glen Fraser
@totalgee
May 05 2015 15:01
Cool, yeah, it is indeed a good bit faster with your latest changes; around 20%, as you say. Nice job!
Jason Turner
@lefticus
May 05 2015 16:05
I'm now almost positive that I'm faster than say, SWIG generated Ruby wrappers
as far as calling back into your C++ from Ruby (using SWIG) vs calling back into C++ from ChaiScript
Glen Fraser
@totalgee
May 05 2015 17:49
I updated my gist (see above) with the latest performance measurements.
patlecat
@patlecat
May 05 2015 18:02
Sounds awesome.
I noticed you made a lot of changes in the last weeks. Are you planing a release soon? @lefticus
Jason Turner
@lefticus
May 05 2015 18:29
Yes! I will absolutely make a release before C++Now, which starts on the 11th
Andreas Reischuck
@arBmind
May 05 2015 18:30
@lefticus why do you keep the use std::make_shared option default to FALSE ?
patlecat
@patlecat
May 05 2015 18:31
Perfect. I was hoping you'd say that @lefticus so it'll be worth waiting a bit longer.
Andreas Reischuck
@arBmind
May 05 2015 18:31
option(USE_STD_MAKE_SHARED "Use std::make_shared instead of chaiscript::make_shared" FALSE)
Jason Turner
@lefticus
May 05 2015 18:32
@arBmind Because std::make_shared is slower to compile, uses more ram while compiling, produces slower runtime code and uses more ram at runtime compared to the code I'm using
but I left that in there to test easily moving back to std::make_shared on other platforms
patlecat
@patlecat
May 05 2015 18:32
Thanks a lot for your good work. Chai is really easier to embed into C++ than any other scripting language I tried so far.
Jason Turner
@lefticus
May 05 2015 18:32
http://blog2.emptycrate.com/content/template-code-bloat-revisited-smaller-makeshared for anyone who wants the background on std::make_shared vs chaiscript::make_shared
Andreas Reischuck
@arBmind
May 05 2015 18:33
@lefticus That's strange... I expected be the opposite
Jason Turner
@lefticus
May 05 2015 18:33
yes, everyone does
@arBmind I've shown it to be true I think now with every compiler
This is what happens when you guys push me to have faster/smaller code that uses less RAM :)
This is the detail: https://github.com/ChaiScript/ChaiScript/blob/develop/include/chaiscript/chaiscript_defines.hpp#L66-L74 the point is to prevent the compiler from instantiating a hundred different std::shared_ptr<> instantiations
Jason Turner
@lefticus
May 05 2015 18:38
@totalgee It looks like we're about 3x faster with tcmalloc and latest tweaks than were you started. That might put us in the ballpark of QtScript performance that @arBmind was testing earlier
patlecat
@patlecat
May 05 2015 18:39
Wow so huge performance leaps suddenly? How was that possible?
Jason Turner
@lefticus
May 05 2015 18:43
@patlecat we're almost 2x faster than 5.6.0 right now through lots of little tweaks. If you disable thread support you get a little bit faster. If you use tcmalloc from google you get a little bit faster again. This depends a lot on platform. Threading support on windows is much slower (partially a fault of chaiscript, partially a fault of the implementations available)
(and about 20-30% faster compiles, depending on platform)
patlecat
@patlecat
May 05 2015 18:45
Amazing news. I was contemplating using Chai for my weweb-app server.