Skip to content

Conversation

@Marcono1234
Copy link
Contributor

Purpose

Improve JsonWriter#value(Number) performance for JDK number types

Description

For JDK number types other than Float and Double there is no need to check if the number string is NaN or Infinity.

This was an oversight when I originally added the validation in #2060.

For JDK number types other than `Float` and `Double` there is no need to
check if the number string is NaN or Infinity.
Copy link
Member

@eamonnmcmanus eamonnmcmanus left a comment

Choose a reason for hiding this comment

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

This looks like a good improvement. One very nitpicky comment.

@eamonnmcmanus eamonnmcmanus merged commit d4d6744 into google:main Jun 18, 2024
@Marcono1234 Marcono1234 deleted the marcono1234/JsonWriter-value-Number-performance branch June 23, 2024 20:56
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