nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
lib/core: Perfize reset in `FlatBuffer`
[nit.git]
/
lib
/
core
/
text
/
flat.nit
diff --git
a/lib/core/text/flat.nit
b/lib/core/text/flat.nit
index
67ffacf
..
09dc9ad
100644
(file)
--- a/
lib/core/text/flat.nit
+++ b/
lib/core/text/flat.nit
@@
-924,7
+924,10
@@
class FlatBuffer
is_dirty = true
_bytelen = 0
_length = 0
- if written then reset
+ if written then
+ _capacity = 16
+ reset
+ end
end
redef fun empty do return new Buffer