sodiray / radash

Functional utility library - modern, simple, typed, powerful
https://radash-docs.vercel.app
MIT License
4.1k stars 160 forks source link

perf: improve assign ops/s by 2x #395

Open Kinbaum opened 4 months ago

Kinbaum commented 4 months ago

Description

Enhanced the assign function for better performance by replacing Object.entries/reduce with a for-in loop.

This has a 2x improvement on ops/s.

JS Benchmark:

Checklist

vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
radash-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 5, 2024 3:12pm
rd-xx commented 3 months ago

This is huge. I'm seeing a 3.6x improvement on M1 Pro 🙌

Such a shame this library is not being maintained anymore

aleclarson commented 1 month ago

Hi @Kinbaum, your fix is available in radashi@beta today (see #13). An official release is pending. We'd love to have you participate in the discussion and/or development of the radashi-org/radashi fork. 😄

@rd-xx You are invited as well!

rd-xx commented 1 month ago

Hi @aleclarson, thank you very much for your work. I had no idea radash had an active fork, I will be making the switch soon enough :)