Joshua Haberman
887abe669f
Added an example, constified some more methods.
13 years ago
Joshua Haberman
621c0cdcb5
Const invasion: large parts of upb made const-correct.
13 years ago
Joshua Haberman
4a8b9be46c
Header cleanup, clarify/correct comments for interfaces.
13 years ago
Joshua Haberman
daf36f0747
Get rid of upb_symtabtxn.
...
This type was nothing but a map of defs.
We can as easily just pass an array of defs
into upb_symtab_add().
14 years ago
Joshua Haberman
10265aa56b
Directory restructure.
...
Includes are now via upb/foo.h.
Files specific to the protobuf format are
now in upb/pb (the core library is concerned
with message definitions, handlers, and
byte streams, but knows nothing about any
particular serializationf format).
14 years ago
Joshua Haberman
6a1f3a6693
Major refactoring: upb_string is gone in favor of upb_strref.
14 years ago
Joshua Haberman
559e23c796
Major refactoring: abandon upb_msg, add upb_accessors.
...
Next on the chopping block is upb_string.
14 years ago
Josh Haberman
b796c1b317
Update copyright to be Google Inc.
...
This doesn't reflect any material change in
how I will be working on upb, and I have no
problem making this change. It's still open
source under the BSD license, and I'll still
be working on it well beyond the hours that
constitute a normal job.
14 years ago
Joshua Haberman
a75a305c77
Implemented upb_stringsink, upb_msgtotext, and exposed the latter to Lua.
14 years ago
Joshua Haberman
d8b2154862
First version of an assembly language decoder.
...
It is slower than the C decoder for now because it
falls off the fast path too often. But it can
successfully decode varints, fixed32 and fixed64.
14 years ago
Joshua Haberman
f1e1cc4695
Split inttable into a hash part and an array part.
...
upb_inttable() now supports a "compact" operation that will
decide on an array size and put all entries with small enough
keys into the array part for faster lookup.
Also exposed the upb_itof_ent structure and put a few useful
values there, so they are one fewer pointer chase away.
14 years ago
Joshua Haberman
a80bcc5085
Recover bad performance of 0-keyed tables.
...
We do this by special-casing the (unusual) zero case
and only bother checking the is_empty bit in the
zero case.
14 years ago
Joshua Haberman
4f9aeee6c7
More completely fixed the 0-key thing.
...
Unfortunately this degrades hash table lookup performance by
about 8%, which affects the streaming benchmark for googlemessage1
by about 5%. We could get this back at the cost of some memory,
but it would be nice to avoid that.
14 years ago
Joshua Haberman
6117730c85
Remove the restriction that 0 cannot be a table key.
...
This fixes issue:
http://code.google.com/p/upb/issues/detail?id=1
14 years ago
Joshua Haberman
6bdbb45e88
Merged core/ and stream/ -> src/. The split wasn't worth it.
14 years ago
Joshua Haberman
28ec9a1fa0
Split src/ into core/ and stream/.
15 years ago
Joshua Haberman
992a03be55
More decoder work, first attempts at compiling it.
15 years ago
Joshua Haberman
d5566c6038
Remove struct keyword from all types, use typedef instead.
15 years ago
Joshua Haberman
fa5710f1ca
upb_string* -> upb_strptr, to follow aliasing rules.
15 years ago
Joshua Haberman
cc39625767
Getting closer, only a few functions undefined now.
15 years ago
Joshua Haberman
e5debfa1c9
More incremental work; ported some of upbc.
15 years ago
Joshua Haberman
f49f7f94c1
More progress, upb_data and upb_def compile (but are incomplete).
15 years ago
Joshua Haberman
c241976485
In the midst of a major refactoring.
15 years ago
Joshua Haberman
a95ab58e79
Overhaul defs to derive from a common base.
15 years ago
Joshua Haberman
b2a890263f
Properly initialize the fqname member of upb_msg.
16 years ago
Joshua Haberman
462b26c1cc
Directory restructuring.
16 years ago
Joshua Haberman
c208db0752
Pre-compute the hash table mask to avoid doing it in the critical path.
16 years ago
Joshua Haberman
b94a9f2101
More documentation, tidying up, etc.
16 years ago
Joshua Haberman
06efc6b12c
Fixed a lot of bugs, parser and compiler now work a little!
16 years ago
Joshua Haberman
94a2f5bd9c
Move upb_string into its own header file.
16 years ago
Joshua Haberman
03616c86ea
Fixed test_table and a few bugs in upb_table.
16 years ago
Joshua Haberman
2da3b081c4
More work on upb_context.
16 years ago
Joshua Haberman
ec67a5ded6
Implemented a bit more of upb_context.
16 years ago
Joshua Haberman
7ccb32c305
Finished hashtable implementation, not yet tested.
16 years ago
Joshua Haberman
0124bfd8fe
More work on inttable/strtable (not finished).
16 years ago
Joshua Haberman
9c21992286
Added MurmurHash for string hashing (not used yet).
16 years ago
Joshua Haberman
bc717d8402
Implement inlining that works with both C99 and all versions of GCC.
16 years ago
Joshua Haberman
5ec762a600
Added TODO about experimenting with Cuckoo Hashing.
16 years ago
Joshua Haberman
f4c00fc979
More work on the table implementation.
...
It currently beats std::map and std::hash_map by >10x.
16 years ago
Joshua Haberman
d1f78c88fa
A bunch more work, a fast table for field lookup.
16 years ago