fury icon indicating copy to clipboard operation
fury copied to clipboard

perf(python): optimize pystr deserialize perf

Open chaokunyang opened this issue 11 months ago • 1 comments

What does this PR do?

This PR implemented an optimized version of PyUnicode_FromUCS1/Fury_PyUnicode_FromUCS2 for faster performance by :

  • replace max char check using SIMD
  • Cast ucs2 array to ucs1 array by SIMD

Related issues

Does this PR introduce any user-facing change?

  • [ ] Does this PR introduce any public API change?
  • [ ] Does this PR introduce any binary protocol compatibility change?

Benchmark

chaokunyang avatar Jan 14 '25 05:01 chaokunyang

cc @penguin-wwy @pandalee99 @theweipeng

chaokunyang avatar Jan 15 '25 15:01 chaokunyang