Page MenuHomeFreeBSD

Prototype of replacing bsdiff's qsufsort with Yuta Mori's libdivsufsort.
AbandonedPublic

Authored by delphij on May 25 2016, 7:45 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jul 3, 12:26 PM
Unknown Object (File)
Thu, Jul 2, 8:59 AM
Unknown Object (File)
Wed, Jul 1, 1:20 AM
Unknown Object (File)
Sun, Jun 21, 12:23 PM
Unknown Object (File)
Apr 30 2026, 2:13 AM
Unknown Object (File)
Apr 22 2026, 7:41 AM
Unknown Object (File)
Apr 18 2026, 3:43 PM
Unknown Object (File)
Apr 15 2026, 3:17 AM
Subscribers

Details

Reviewers
cperciva
Summary

This is a preliminary proof-of-concept implementation of bsdiff
using libdivsufsort instead of qsufsort. (if we consider this
as the right direction I'll import the code into vendor area
instead).

My test shows this would offer a 36% speed up for generating
patch.

Ported from Chromium: https://chromium-review.googlesource.com/#/c/1080/

x before
+ after
+------------------------------------------------------------+

+ x
+ x
+ x
++ xx
AA

+------------------------------------------------------------+

N           Min           Max        Median           Avg        Stddev

x 5 8.56 8.6 8.58 8.584 0.016733201
+ 5 5.41 5.44 5.43 5.426 0.011401754
Difference at 95.0% confidence
-3.158 +/- 0.0208817
-36.7894% +/- 0.243263%
(Student's t, pooled s = 0.0143178)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3944
Build 3987: arc lint + arc unit

Event Timeline

delphij retitled this revision from to Prototype of replacing bsdiff's qsufsort with Yuta Mori's libdivsufsort..
delphij updated this object.
delphij edited the test plan for this revision. (Show Details)
delphij added a reviewer: cperciva.

library code taken from https://github.com/y-256/libdivsufsort; bsdiff change adapted from Chromium source.

usr.bin/bsdiff/bsdiff/config.h
1

Generated with -DCMAKE_BUILD_TYPE="Release" -DBUILD_DIVSUFSORT64=ON

usr.bin/bsdiff/bsdiff/divsufsort.c
1

vendor code unchanged.

usr.bin/bsdiff/bsdiff/divsufsort64.h
1

Generated file.

usr.bin/bsdiff/bsdiff/divsufsort_private.h
1

Vendor file.

usr.bin/bsdiff/bsdiff/sssort.c
1

Vendor file.

usr.bin/bsdiff/bsdiff/trsort.c
1

Vendor file.

usr.bin/bsdiff/bsdiff/utils.c
1

Vendor file.

The change was merged as rS303285.