Ho-Ro / Hantek6022API

Hantek 6022BE Python API for Windows and Linux.
https://ho-ro.github.io/Hantek6022API/
Other
98 stars 15 forks source link

Performance improved through numpy. #22

Closed BMecke closed 1 year ago

BMecke commented 1 year ago

Numpy is now used in functions scale_read_data and convert_sampling_rate_to_measurement_times to improve performance.

Since these functions are time critical, the execution speed should be as fast as possible. With numpy, the performance can almost be doubled here.

Output of performance.txt: measurement times new: 2.313504457473755 measurement times old: 5.265141010284424 scale read data new: 5.61890435218811 scale read data old: 8.594855070114136

performance.txt

Ho-Ro commented 1 year ago

Thx, I always like to get improvement proposals. I will check and merge when I'm back on my computer.