Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(zipObject): Add zipObject function #92

Merged
merged 6 commits into from
Jun 29, 2024
Merged

Conversation

hautest
Copy link
Contributor

@hautest hautest commented Jun 29, 2024

#82

This pull request implements a zipObject function that operates similarly to Lodash's zipObject. The function takes two arrays as parameters and returns a single object. The first array provides the keys for the returned object, and the second array provides the corresponding values.

Below is a benchmark comparison between our zipObject implementation and Lodash's zipObject.

zipObject bench

@hautest hautest requested a review from raon0211 as a code owner June 29, 2024 09:45
Copy link

vercel bot commented Jun 29, 2024

@hautest is attempting to deploy a commit to the Toss Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Collaborator

@raon0211 raon0211 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Thanks for your great contribution!

@raon0211 raon0211 merged commit 5377450 into toss:main Jun 29, 2024
6 of 8 checks passed
Copy link

codspeed-hq bot commented Jun 29, 2024

CodSpeed Performance Report

Merging #92 will degrade performances by 85.26%

Comparing hautest:feat/zipObject (8d2e71c) with main (a8d7e03)

Summary

⚡ 4 improvements
❌ 8 regressions
✅ 80 untouched benchmarks

🆕 2 new benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main hautest:feat/zipObject Change
lodash 49.1 µs 333.2 µs -85.26%
lodash/differenceWith 69.3 µs 347.7 µs -80.06%
lodash/intersectionBy 516.9 µs 450.5 µs +14.73%
lodash/intersectionWith 92.1 µs 376.9 µs -75.56%
lodash/isNil 190.8 µs 35.7 µs ×5.3
lodash/pick 393.2 µs 86.5 µs ×4.5
lodash/union 76.5 µs 361.9 µs -78.86%
lodash/unionBy 75.5 µs 229.2 µs -67.04%
lodash/unionWith 84.9 µs 238.8 µs -64.44%
es-toolkit/uniqBy 6.8 ms 15.7 ms -56.33%
lodash/xor 380.2 µs 241.9 µs +57.15%
lodash/xorBy 91 µs 252.3 µs -63.91%
🆕 es-toolkit/zipObject N/A 23.8 µs N/A
🆕 lodash/zipObject N/A 32.5 µs N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants