Improved Python scientific calculation speed

Francois Tigeot ftigeot at wolfpond.org
Wed Feb 21 15:08:26 PST 2018


Hi,

I have recently discovered the default packaging options for scientific
software in dports were far from optimal.

math/py-numpy used an old, slow implementation of BLAS by default.

The faster implementation I have replaced it with, OpenBLAS, was
built without any MP support. Only one core was being used for calculations
with Keras, Theano, etc...

These two commits improve performance tremendously with modern hardware:
https://github.com/DragonFlyBSD/DeltaPorts/commit/c232c70c0a975f58c58b10dadcad870c8c3c597a
https://github.com/DragonFlyBSD/DeltaPorts/commit/90d6598a1482c700be75032b4f4680afc203c86a

The changes should trigger down to dports and packages in a few days.

Some custom py-numpy code went from ~= 2000 to ~= 600 seconds per run on a
6-core Coffeelake desktop PC.

-- 
Francois Tigeot



More information about the Users mailing list