On Fri, 1 Sep 2023 12:01:58 GMT, 温绍锦 <d...@openjdk.org> wrote:

>> @cl4es can you help me to review this PR?
>
>> @wenshao How about of approach used in [James Anhalt's 
>> algorithm](https://jk-jeon.github.io/posts/2022/02/jeaiii-algorithm/)?
>> 
>> It reduces number of multiplications ([and store operations in case of 
>> writing by 4-8 byte 
>> words](https://github.com/plokhotnyuk/jsoniter-scala/blob/b1020bafa7e2e5b7e8dd87b86a9e860975f4695e/jsoniter-scala-core/jvm/src/main/scala/com/github/plokhotnyuk/jsoniter_scala/core/JsonWriter.scala#L2004-L2023))
>>  but increases the total number of instructions for the routine.
> 
> If the compiled code size is greater than 325 (FreqInlineSize), it will not 
> be inlined and performance will slow down. This algorithm obviously greater 
> than 325.
> 
> different algorithms perform differently on different types of tiny/small/big 
> values.
> 
> The [first 
> commit](https://github.com/openjdk/jdk/pull/14699/files/8bdda26b8bb7f6162592a07445ecd2285e4fabaa)
>  of this PR performs better under big values. But I still use the current 
> algorithm, with few changes, and performance can be improved in all scenarios.

> @wenshao Please do not rebase or force-push to an active PR as it invalidates 
> existing review comments. Note for future reference, the bots always squash 
> all changes into a single commit automatically as part of the integration. 
> See [OpenJDK Developers’ 
> Guide](https://openjdk.org/guide/#working-with-pull-requests) for more 
> information.

to solve the problem of build failure, i did git rebase & push force.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/14699#issuecomment-1704556037

Reply via email to