Achieve 25% speedup in '--all-in-ram' mode#2
Merged
jjwhitney merged 4 commits intojjwhitney:masterfrom Oct 31, 2012
trofi:master
Merged
Achieve 25% speedup in '--all-in-ram' mode#2jjwhitney merged 4 commits intojjwhitney:masterfrom trofi:master
jjwhitney merged 4 commits intojjwhitney:masterfrom
trofi:master
Conversation
added 4 commits
October 31, 2012 12:07
Make sure we don't modify data supplied by user. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
…static binary)
Usage example:
make libbdelta.a bdelta LDFLAGS=-static
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
…more, than 4096 bytes
User can (And I did) pass large block sizes for initial passes,
but the code is not ready for it:
match_backward() {
...
if (numtoread > blocksize) numtoread = blocksize;
Token buf1[4096], buf2[4096];
const Token *read1 = b->read1(buf1, p1, numtoread),
...
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
libbdelta allows avoidance of temporary buffers if
caller guarantees persistence of read data.
--all-in-ram case is exactly this kind of workload!
Adjust memory reading function to just return pointer to data.
On my workload it speeds things up about ~25%
time ./bdelta --all-in-ram win32.udb.{old,new,old-new.bdt}
time bdelta --all-in-ram win32.udb.{old,new,old-new.bdt.orig}
real 0m33.888s
user 0m28.790s
sys 0m2.316s
real 0m39.990s
user 0m35.116s
sys 0m2.189s
win32.udb.old and win32.udb.new are files 171MB sized,
patch is 27MB with 1 million of chunks.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Owner
|
Nice work! |
jjwhitney
added a commit
that referenced
this pull request
Oct 31, 2012
Achieve 25% speedup in '--all-in-ram' mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.