On Mon, 26 Aug 2024 13:44:58 GMT, Weijun Wang <wei...@openjdk.org> wrote:

>> I see. In fact, what if `byteState` is an instance variable outside the 
>> method? If a previous squeeze has left some bytes there, there is no need to 
>> call `asLittleEndian.set` again next time they are needed. Does it help in 
>> any performance gain? especially if the caller only squeeze a few bytes each 
>> time?
>
> Also, a comment will be nice here. Otherwise, some people might still want to 
> move it.

I have considered the instance variable as well.  It might help the performance 
of the case you mention (many small squeezes), but I don't think that would be 
a typical use case. I am adding the comment.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20631#discussion_r1731291851

Reply via email to