diff options
| author | tylov <[email protected]> | 2023-07-24 22:57:44 +0200 |
|---|---|---|
| committer | tylov <[email protected]> | 2023-07-24 22:57:44 +0200 |
| commit | 78ba677b59a8cecd69f733fca1a37ad01b38320f (patch) | |
| tree | 7a045c9c60ff74f6b04c10ce05921a3b3782c499 /include | |
| parent | f1f0c01e798eb3217e62a43de660723173984547 (diff) | |
| download | STC-modified-78ba677b59a8cecd69f733fca1a37ad01b38320f.tar.gz STC-modified-78ba677b59a8cecd69f733fca1a37ad01b38320f.zip | |
Updated and fixed benchmarks and performance graphs.
Diffstat (limited to 'include')
| -rw-r--r-- | include/stc/cstack.h | 2 | ||||
| -rw-r--r-- | include/stc/cvec.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/stc/cstack.h b/include/stc/cstack.h index f8640ed1..8fb176e1 100644 --- a/include/stc/cstack.h +++ b/include/stc/cstack.h @@ -103,7 +103,7 @@ STC_INLINE bool _cx_MEMB(_reserve)(_cx_Self* self, intptr_t n) { STC_INLINE _cx_value* _cx_MEMB(_append_uninit)(_cx_Self *self, intptr_t n) { intptr_t len = self->_len; - if (!_cx_MEMB(_reserve)(self, len + n)) return NULL; + if (!_cx_MEMB(_reserve)(self, len*3/2 + n)) return NULL; self->_len += n; return self->data + len; } diff --git a/include/stc/cvec.h b/include/stc/cvec.h index d08e382f..774f0582 100644 --- a/include/stc/cvec.h +++ b/include/stc/cvec.h @@ -316,7 +316,7 @@ _cx_MEMB(_resize)(_cx_Self* self, const intptr_t len, i_key null) { STC_DEF _cx_value* _cx_MEMB(_push)(_cx_Self* self, i_key value) { if (self->_len == self->_cap) - if (!_cx_MEMB(_reserve)(self, self->_len*3/2 + 4)) + if (!_cx_MEMB(_reserve)(self, self->_len*2 + 4)) return NULL; _cx_value *v = self->data + self->_len++; *v = value; |
