sverchok icon indicating copy to clipboard operation
sverchok copied to clipboard

Significinatly speed up foreach_get/foreach_set in some cases

Open Andrej730 opened this issue 1 year ago • 0 comments

Addressed problem description

Significinatly speed up foreach_get/foreach_set in some cases by using correct data types.

see https://b3d.interplanety.org/en/optimizing-the-speed-of-data-access-using-foreach_/ for general example why it's faster - basically it's just copying the entire chunk of data instead of spending time converting them to matching data type.

On "I" instead of np.uint32 - apparently in numpy it's a different thing, see tests in https://blenderartists.org/t/foreach-get-foreach-set-attribute-types/1579029

Preflight checklist

Put an x letter in each brackets when you're done this item:

  • [X] Code changes complete.
  • [X] Code documentation complete.
  • [X] Documentation for users complete (or not required, if user never sees these changes).
  • [ ] Manual testing done. Will be testing for a few days.
  • [X] Unit-tests implemented.
  • [ ] Ready for merge.

Andrej730 avatar Mar 20 '25 10:03 Andrej730