Skip to content
This repository was archived by the owner on Jan 13, 2023. It is now read-only.

Fix NumberFormatException stack performance. - #6

Merged
TheDGOfficial merged 2 commits into
mainfrom
performance/nfe-stack
Feb 17, 2021
Merged

Fix NumberFormatException stack performance.#6
TheDGOfficial merged 2 commits into
mainfrom
performance/nfe-stack

Conversation

@TheDGOfficial

Copy link
Copy Markdown
Member

Changes made in this Pull Request

Creating exceptions is not cheap, since they construct stack frames.
This shouldn't affect performance much, but fix/optimize it anyway.

Reason of the above changes are

We do not need to parse the input as integer, and this causes constructing useless NumberFormatException instances, which allocate more memory/consume time than needed.

Other information about this Pull Request

N/A

Creating exceptions is not cheap, since they construct stack frames.
This shouldn't affect performance much, but fix/optimize it anyway.
@TheDGOfficialTheDGOfficial added the enhancement New feature or request label Feb 17, 2021
@TheDGOfficialTheDGOfficial added this to the v1.0 milestone Feb 17, 2021
@TheDGOfficialTheDGOfficial self-assigned this Feb 17, 2021
@TheDGOfficial
TheDGOfficial enabled auto-merge (squash) February 17, 2021 16:32
@TheDGOfficial
TheDGOfficial merged commit 2899d2d into mainFeb 17, 2021
@TheDGOfficial
TheDGOfficial deleted the performance/nfe-stack branch February 17, 2021 16:43
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@TheDGOfficial