Skip to content

refactor: optimise parser for performance - #21

Merged
bendrucker merged 1 commit into
bendrucker:masterfrom
6fold:master
Mar 9, 2021
Merged

bendrucker merged 1 commit into
bendrucker:masterfrom
6fold:master

Conversation

@henrinormak

Copy link
Copy Markdown
Contributor

Closes #20

It is not verbatim copy of the TS version of the parser we wrote, as I didn't want to convert this package to typescript (let me know if you think that's still valid and OK to do).

It also handles infinity slightly differently (we chose to go with always returning a Date object, instead of returning either date or number) than the package mentioned in the issue.

The performance gains should still be there though.

@bendrucker

Copy link
Copy Markdown
Owner

Thanks, will have a look at this soon!

I didn't want to convert this package to typescript (let me know if you think that's still valid and OK to do).

Appreciated, I'm happy to have typings included but I'm more hesitant to take on the burden of having to transpile.

@henrinormak

Copy link
Copy Markdown
Contributor Author

Have you had time to check this out? Regards TS, I think it then makes sense to just skip typing this package, if there is a need, a package can be added to DefinitelyTyped.

@bendrucker

Copy link
Copy Markdown
Owner

Sorry not yet but should get to it this week

@bendrucker
bendrucker merged commit 11ac2d3 into bendrucker:master Mar 9, 2021
@bendrucker

Copy link
Copy Markdown
Owner

Published as 2.0.1, thanks again!

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.

Idea to improve performance of parsing by ~3x

2 participants