lib: use Object spread instead of Object.assign
To optimize performance, use Object spread instead of Object.assign
Performance comparison chart
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests or benchmarks are included -
commit message follows commit guidelines