Remove unused limit/mark I/O fields

name                                             old speed     new speed     delta

wuffs_deflate_decode_1k_full_init/clang5         146MB/s ± 0%  149MB/s ± 1%  +2.33%  (p=0.000 n=9+10)
wuffs_deflate_decode_1k_part_init/clang5         180MB/s ± 0%  183MB/s ± 0%  +1.46%  (p=0.000 n=10+10)
wuffs_deflate_decode_10k_full_init/clang5        229MB/s ± 0%  244MB/s ± 0%  +6.53%  (p=0.000 n=9+10)
wuffs_deflate_decode_10k_part_init/clang5        236MB/s ± 1%  251MB/s ± 0%  +6.38%  (p=0.000 n=10+10)
wuffs_deflate_decode_100k_just_one_read/clang5   266MB/s ± 0%  278MB/s ± 1%  +4.75%  (p=0.000 n=9+10)
wuffs_deflate_decode_100k_many_big_reads/clang5  224MB/s ± 0%  238MB/s ± 0%  +6.03%  (p=0.000 n=10+10)

wuffs_deflate_decode_1k_full_init/gcc7           151MB/s ± 2%  151MB/s ± 0%    ~     (p=0.965 n=10+8)
wuffs_deflate_decode_1k_part_init/gcc7           187MB/s ± 1%  188MB/s ± 0%  +0.57%  (p=0.001 n=10+9)
wuffs_deflate_decode_10k_full_init/gcc7          261MB/s ± 1%  259MB/s ± 1%  -0.91%  (p=0.000 n=10+10)
wuffs_deflate_decode_10k_part_init/gcc7          269MB/s ± 0%  268MB/s ± 0%  -0.65%  (p=0.000 n=10+9)
wuffs_deflate_decode_100k_just_one_read/gcc7     314MB/s ± 0%  312MB/s ± 0%  -0.49%  (p=0.000 n=10+10)
wuffs_deflate_decode_100k_many_big_reads/gcc7    249MB/s ± 0%  247MB/s ± 0%  -1.08%  (p=0.000 n=10+10)
This commit is contained in:
Nigel Tao committed 2019-07-06 12:07:53 +10:00
1 parent 15bd5aa63c
commit 931b8e37f9
4 files changed
+12 -85

No files matched your search

-36
View File
@@ -1283,11 +1283,6 @@ typedef struct {
// compatibility or safety guarantee if you do so.
struct {
struct wuffs_base__io_buffer__struct* buf;
// The bounds values are typically NULL, when created by the Wuffs public
// API. NULL means that the callee substitutes the implicit bounds derived
// from buf.
uint8_t* mark;
uint8_t* limit;
} private_impl;
} wuffs_base__io_reader;
@@ -1296,11 +1291,6 @@ typedef struct {
// compatibility or safety guarantee if you do so.
struct {
struct wuffs_base__io_buffer__struct* buf;
// The bounds values are typically NULL, when created by the Wuffs public
// API. NULL means that the callee substitutes the implicit bounds derived
// from buf.
uint8_t* mark;
uint8_t* limit;
} private_impl;
} wuffs_base__io_writer;
@@ -1381,8 +1371,6 @@ static inline wuffs_base__io_reader //
wuffs_base__null_io_reader() {
wuffs_base__io_reader ret;
ret.private_impl.buf = NULL;
ret.private_impl.mark = NULL;
ret.private_impl.limit = NULL;
return ret;
}
@@ -1390,8 +1378,6 @@ static inline wuffs_base__io_writer //
wuffs_base__null_io_writer() {
wuffs_base__io_writer ret;
ret.private_impl.buf = NULL;
ret.private_impl.mark = NULL;
ret.private_impl.limit = NULL;
return ret;
}
@@ -1415,8 +1401,6 @@ static inline wuffs_base__io_reader //
wuffs_base__io_buffer__reader(wuffs_base__io_buffer* buf) {
wuffs_base__io_reader ret;
ret.private_impl.buf = buf;
ret.private_impl.mark = NULL;
ret.private_impl.limit = NULL;
return ret;
}
@@ -1424,8 +1408,6 @@ static inline wuffs_base__io_writer //
wuffs_base__io_buffer__writer(wuffs_base__io_buffer* buf) {
wuffs_base__io_writer ret;
ret.private_impl.buf = buf;
ret.private_impl.mark = NULL;
ret.private_impl.limit = NULL;
return ret;
}
@@ -4536,20 +4518,6 @@ wuffs_base__io__since(uint64_t mark, uint64_t index, uint8_t* ptr) {
return wuffs_base__make_slice_u8(NULL, 0);
}
// TODO: wuffs_base__io_reader__is_eof is no longer used by Wuffs per se, but
// it might be handy to programs that use Wuffs. Either delete it, or promote
// it to the public API.
//
// If making this function public (i.e. moving it to base-header.h), it also
// needs to allow NULL (i.e. implicit, callee-calculated) mark/limit.
static inline bool //
wuffs_base__io_reader__is_eof(wuffs_base__io_reader o) {
wuffs_base__io_buffer* buf = o.private_impl.buf;
return buf && buf->meta.closed &&
(buf->data.ptr + buf->meta.wi == o.private_impl.limit);
}
static inline uint32_t //
wuffs_base__io_writer__copy_n_from_history(uint8_t** ptr_iop_w,
uint8_t* io0_w,
@@ -4691,8 +4659,6 @@ wuffs_base__io_reader__set(wuffs_base__io_reader* o,
b->meta.closed = false;
o->private_impl.buf = b;
o->private_impl.mark = data.ptr;
o->private_impl.limit = data.ptr + data.len;
*ptr_iop_r = data.ptr;
*ptr_io1_r = data.ptr + data.len;
@@ -4724,8 +4690,6 @@ wuffs_base__io_writer__set(wuffs_base__io_writer* o,
b->meta.closed = false;
o->private_impl.buf = b;
o->private_impl.mark = data.ptr;
o->private_impl.limit = data.ptr + data.len;
*ptr_iop_w = data.ptr;
*ptr_io1_w = data.ptr + data.len;