-
Notifications
You must be signed in to change notification settings - Fork 7
Conversation
5286f15
to
b8598c0
Compare
b8598c0
to
207f2a9
Compare
207f2a9
to
182b975
Compare
isField: (intKey & 8) == 8, | ||
isMethod: (intKey & 16) == 16, | ||
isStatic: (intKey & 32) == 32)); | ||
members['a'] = _makeMember('a'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: should we create unique names, so that we actually encode more strings in the object and not just a ton of pointers? Just in case that matters, because in practice most members wont have the same names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, done, this also addresses "member names won't be known in advance".
import 'serialization_benchmark.dart'; | ||
|
||
/// Benchmark accumulating data into a [JsonBuffer] via [LazyMap]. | ||
class BufferMapsBufferWireBenchmark extends SerializationBenchmark { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: include LazyMap
in the name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Thanks! Output after changes
|
These are the benchmarks I was using while writing
JsonBufferBuilder
.The output is not particularly stable, as you can see from the variation over three runs, full output below. But it's enough for approximate work :)