You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Kameleon version is ~10x faster. Given that they both are interfacing with CCMC.so, this is somewhat unexpected.
On a side note, I also did an experiment to determine how much faster it is to loop over a grid and calling the interpolator at each iteration in a C++ program than looping over the same grid in a Python program (the Kameleon Python wrapper only allows scalars to be passed). It is about 3x faster. This is sort of on the border of where I want to bother doing anything about it. If I do, I'll share the code.
The text was updated successfully, but these errors were encountered:
The kamodo wrapper for kameleon was meant as a stop gap until we have fully kamodofied interpolators for each of the kameleon-supported models. Since kameleon was compiled for python27, the kamodo interface was using a bridge to run a separate python27 executable.
Kamodo just wraps whatever interpolator you are using, so it should not be the bottleneck. most of the time, you're using scipy functions. For some models, though, you have an optimized Fortran or C interpolator that's unique to the model's data structure. The job of a kamodo subclass is to hide all the ugly interface stuff for the model or data source from the end user, so all they see is just the functional form of the interpolator.
I made a comparison of the time for interpolation using Kamodo and the KameleonPlus Python wrapper. See the two files at
See https://github.com/GaryQ-physics/magnetosphere/tree/master/misc/kameleon_kamodo_compare
The Kameleon version is ~10x faster. Given that they both are interfacing with
CCMC.so
, this is somewhat unexpected.On a side note, I also did an experiment to determine how much faster it is to loop over a grid and calling the interpolator at each iteration in a C++ program than looping over the same grid in a Python program (the Kameleon Python wrapper only allows scalars to be passed). It is about 3x faster. This is sort of on the border of where I want to bother doing anything about it. If I do, I'll share the code.
The text was updated successfully, but these errors were encountered: