bmap: Dropped treediff buffers for now
We're not currently using these (at the moment it's unclear if the
original intention behind the treediff algorithms is worth pursuing),
and they are showing up in our heap benchmarks.
The good news is that means our heap benchmarks are working.
Also saves a bit of code/ctx in bmap mode:
code stack ctx
before: 37024 2352 684
after: 37024 (+0.0%) 2352 (+0.0%) 684 (+0.0%)
code stack ctx
bmap before: 38752 2456 812
bmap after: 38704 (-0.1%) 2456 (+0.0%) 800 (-1.5%)
This commit is contained in:
@@ -465,12 +465,13 @@ struct lfs3_cfg {
|
||||
lfs3_size_t lookahead_size;
|
||||
#endif
|
||||
|
||||
// Size of the treediff buffer in bytes. A larger treediff buffer speeds
|
||||
// up tree diffing in BMAPSLOW and BMAPFAST modes. The treediff buffer
|
||||
// also uses a compact bitmap, and sizes >block_count/8 have no effect.
|
||||
#if !defined(LFS3_RDONLY) && defined(LFS3_BMAP)
|
||||
lfs3_size_t treediff_size;
|
||||
#endif
|
||||
// TODO rm me
|
||||
// // Size of the treediff buffer in bytes. A larger treediff buffer speeds
|
||||
// // up tree diffing in BMAPSLOW and BMAPFAST modes. The treediff buffer
|
||||
// // also uses a compact bitmap, and sizes >block_count/8 have no effect.
|
||||
// #if !defined(LFS3_RDONLY) && defined(LFS3_BMAP)
|
||||
// lfs3_size_t treediff_size;
|
||||
// #endif
|
||||
|
||||
// Flags indicating what gc work to do during lfs3_gc calls.
|
||||
#ifdef LFS3_GC
|
||||
@@ -520,11 +521,12 @@ struct lfs3_cfg {
|
||||
void *lookahead_buffer;
|
||||
#endif
|
||||
|
||||
// Optional statically allocated treediff buffer. Must be treediff_size.
|
||||
// By default lfs3_malloc is used to allocate this buffer.
|
||||
#if !defined(LFS3_RDONLY) && defined(LFS3_BMAP)
|
||||
void *treediff_buffer;
|
||||
#endif
|
||||
// TODO rm me
|
||||
// // Optional statically allocated treediff buffer. Must be treediff_size.
|
||||
// // By default lfs3_malloc is used to allocate this buffer.
|
||||
// #if !defined(LFS3_RDONLY) && defined(LFS3_BMAP)
|
||||
// void *treediff_buffer;
|
||||
// #endif
|
||||
|
||||
// Optional upper limit on length of file names in bytes. No downside for
|
||||
// larger names except the size of the info struct which is controlled by
|
||||
@@ -937,11 +939,12 @@ typedef struct lfs3 {
|
||||
} lookahead;
|
||||
#endif
|
||||
|
||||
#if !defined(LFS3_RDONLY) && !defined(LFS3_2BONLY) && defined(LFS3_BMAP)
|
||||
struct lfs3_treediff {
|
||||
uint8_t *buffer;
|
||||
} treediff;
|
||||
#endif
|
||||
// TODO rm me
|
||||
// #if !defined(LFS3_RDONLY) && !defined(LFS3_2BONLY) && defined(LFS3_BMAP)
|
||||
// struct lfs3_treediff {
|
||||
// uint8_t *buffer;
|
||||
// } treediff;
|
||||
// #endif
|
||||
|
||||
#if !defined(LFS3_RDONLY) && !defined(LFS3_2BONLY)
|
||||
const lfs3_data_t *graft;
|
||||
|
||||
Reference in New Issue
Block a user