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

refactor: remove lodash #1949

Closed
wants to merge 5 commits into from
Closed

refactor: remove lodash #1949

wants to merge 5 commits into from

Conversation

bd82
Copy link
Member

@bd82 bd82 commented Jun 29, 2023

No description provided.

sidharthv96 and others added 2 commits June 30, 2023 02:07
Replace lodash with native ES2015 functions (#1871)

Co-authored-by: Jo Liss <[email protected]>
import { tokenStructuredMatcher } from "../../scan/tokens"

// ES2019 Array.prototype.flatMap
function flatMap<U, R>(arr: U[], callback: (x: U, idx: number) => R[]): R[] {
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO: extract to utils / functional-utils file

Copy link
Member Author

Choose a reason for hiding this comment

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

Or maybe change the compilation target to ES2019?

However, compilation target changes should be done in a separate PR, so the extraction to utils should still be done...

@bd82 bd82 force-pushed the remove_lodash_new branch 2 times, most recently from 3c721fb to fbfeab6 Compare June 30, 2023 11:14
@bd82
Copy link
Member Author

bd82 commented Jun 30, 2023

Seems like a ~6% performance regression in the JSON lexer benchmark.
Perhaps one of the hot-spots in the lexer code was modified?

@bd82
Copy link
Member Author

bd82 commented Jul 2, 2023

Dropping this, will evaluate remda instead.
See: #1870 (comment)

@bd82 bd82 closed this Jul 2, 2023
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