Skip to content

Add a benchmark of MessageBufferInput#reset#129

Merged
xerial merged 2 commits intov07-developfrom
add_unpacker_buffer_reset_benchmark
Aug 11, 2014
Merged

Add a benchmark of MessageBufferInput#reset#129
xerial merged 2 commits intov07-developfrom
add_unpacker_buffer_reset_benchmark

Conversation

@komamitsu
Copy link
Member

@xerial I added a benchmark test of MessageBufferInput#reset (ArrayBufferInput#reset). But there is no difference between the results which using reset() or not. So I've disabled the test with ignore tag to avoid a test failure.

Can you see if there is room to improve the performance of reset() with this test? It seems that ArrayBufferInput#reset always recreates a new buffer and to reuse the buffer can improve the performance. Thanks.

@xerial
Copy link
Member

xerial commented Aug 10, 2014

Good test :)

It looks like the only overhead in ArrayBufferInput.reset is the cost of creating MessageBuffer. I added reset(MessageBuffer) method, and now it can improve the performance. Thanks.

2__leo_weaver_local___work_git_msgpack-java__java_

xerial added a commit that referenced this pull request Aug 11, 2014
Add a benchmark of MessageBufferInput#reset
@xerial xerial merged commit 359ef12 into v07-develop Aug 11, 2014
@xerial
Copy link
Member

xerial commented Aug 11, 2014

xerial added a commit that referenced this pull request Aug 11, 2014
@xerial
Copy link
Member

xerial commented Aug 11, 2014

Optimization of 65f5dd1 improved the overall performance:
2__leo_weaver_local___work_git_msgpack-java__java_

@xerial xerial deleted the add_unpacker_buffer_reset_benchmark branch November 13, 2014 08:50
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