Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perf: avoid concat on flush as well #8

Merged
merged 1 commit into from
Sep 21, 2017

Conversation

Beanow
Copy link
Contributor

@Beanow Beanow commented Sep 20, 2017

This only helps when we're not zero padding the last buffered data. Otherwise we'll always have at least 2 buffers and concat.

singleRemainder: test({
	inSize: 150*MB,
	inCount: 1,
	blockSize: 160*MB,
	zeroPadding: false
}),
bigRemainder: test({
	inSize: 200*MB,
	inCount: 1,
	blockSize: 101*MB,
	zeroPadding: false
})
Test Version AVG
singleRemainder pull-block master 68ms
singleRemainder pull-block dev 0ms
bigRemainder pull-block master 56ms
bigRemainder pull-block dev 0ms

@Beanow
Copy link
Contributor Author

Beanow commented Sep 20, 2017

Full blown chromium results

Test Version Min AVG Max
singleRemainder master 46ms 59ms 86ms
singleRemainder dev 0ms 0ms 0ms
bigRemainder master 30ms 38ms 70ms
bigRemainder dev 0ms 0ms 0ms
perfectHalves master 0ms 0ms 1ms
perfectHalves dev 0ms 0ms 1ms
almostHalves master 18ms 22ms 30ms
almostHalves dev 18ms 23ms 53ms
perfect10ths master 0ms 1ms 2ms
perfect10ths dev 0ms 1ms 2ms
almost10ths master 4ms 5ms 8ms
almost10ths dev 4ms 5ms 8ms
perfect100ths master 1ms 2ms 3ms
perfect100ths dev 1ms 2ms 4ms
almost100ths master 1ms 3ms 6ms
almost100ths dev 1ms 2ms 3ms
hugeBuffers master 1ms 1ms 2ms
hugeBuffers dev 1ms 1ms 2ms
tinyBufs master 43ms 50ms 81ms
tinyBufs dev 40ms 50ms 75ms
microBufs master 51ms 52ms 64ms
microBufs dev 51ms 59ms 88ms
manyPairs master 41ms 58ms 87ms
manyPairs dev 43ms 71ms 79ms
perfectPairs master 41ms 64ms 76ms
perfectPairs dev 39ms 60ms 75ms
manyTriplets master 44ms 72ms 79ms
manyTriplets dev 44ms 62ms 79ms
bigBuffers master 1ms 1ms 2ms
bigBuffers dev 0ms 1ms 4ms

@Beanow
Copy link
Contributor Author

Beanow commented Sep 21, 2017

Fun fact, the original PR #2 was also due to concat, not slice. As a concat of 1 buffer copies the buffer to a new one. This happened a lot before 405d1ab

@dignifiedquire dignifiedquire merged commit 8b02970 into dignifiedquire:master Sep 21, 2017
@dignifiedquire
Copy link
Owner

Thank you 🎉

@Beanow Beanow deleted the faster branch October 14, 2017 07:55
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