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
A quick glance suggests that the generated converter from pyudunits2 (which uses sympylambdify) is significantly quicker than the one that is generated by udunits2 (used within cf-units). However, this performance doesn't shine until you have a lot of data to convert (e.g. 5000*2500*12 data points). Before that, the cost of reading the XML, parsing, etc. is much higher in pyudunits2. It would be good to micro-benchmark this so that we can focus on speeding things up at pinch points.
I had the following scripted hacked together to roughly compare:
@ocefpaf highlighted some performance issues in ioos/compliance-checker#1118 (comment). I don't really think the magnitude there is representative of the performance of pyudunuts2 (given the entire test suite of pyudunits2 runs in <2s), but it would be good to both get the aforementioned metrics, and to track down where the performance penalties are coming from in the checker (and whether these are a result of some of the workarounds due to missing pyudunits2 features)
I'm pretty sure we do things in the least optimized way possible in compliance-checker, so please take those number with a grain of salt. Yet, when using cf-units, the tests run super fast. I'll try to debug this further to figure out where the hiccups are.
A quick glance suggests that the generated converter from pyudunits2 (which uses
sympy
lambdify
) is significantly quicker than the one that is generated byudunits2
(used withincf-units
). However, this performance doesn't shine until you have a lot of data to convert (e.g.5000*2500*12
data points). Before that, the cost of reading the XML, parsing, etc. is much higher inpyudunits2
. It would be good to micro-benchmark this so that we can focus on speeding things up at pinch points.I had the following scripted hacked together to roughly compare:
With results along the lines of:
The text was updated successfully, but these errors were encountered: