Joshua Haberman
165e01ec6f
Fix for old Python versions.
4 years ago
Joshua Haberman
40fdff5e43
Merge pull request #339 from haberman/benchmark-alias
...
Added (temporary?) API for copy vs. alias and added benchmarks to test both.
4 years ago
Joshua Haberman
5f8bb5de1d
Updated generated code.
4 years ago
Joshua Haberman
65d166a6ba
Added API for copy vs. alias and added benchmarks to test both.
...
Benchmark output:
$ bazel-bin/benchmarks/benchmark '--benchmark_filter=BM_Parse'
2020-11-11 15:39:04
Running bazel-bin/benchmarks/benchmark
Run on (72 X 3700 MHz CPU s)
CPU Caches:
L1 Data 32K (x36)
L1 Instruction 32K (x36)
L2 Unified 1024K (x36)
L3 Unified 25344K (x2)
-------------------------------------------------------------------------------------
Benchmark Time CPU Iterations
-------------------------------------------------------------------------------------
BM_Parse_Upb_FileDesc<UseArena, Copy> 4134 ns 4134 ns 168714 1.69152GB/s
BM_Parse_Upb_FileDesc<UseArena, Alias> 3487 ns 3487 ns 199509 2.00526GB/s
BM_Parse_Upb_FileDesc<InitBlock, Copy> 3727 ns 3726 ns 187581 1.87643GB/s
BM_Parse_Upb_FileDesc<InitBlock, Alias> 3110 ns 3110 ns 224970 2.24866GB/s
BM_Parse_Proto2<FileDesc, NoArena, Copy> 31132 ns 31132 ns 22437 229.995MB/s
BM_Parse_Proto2<FileDesc, UseArena, Copy> 21011 ns 21009 ns 33922 340.812MB/s
BM_Parse_Proto2<FileDesc, InitBlock, Copy> 17976 ns 17975 ns 38808 398.337MB/s
BM_Parse_Proto2<FileDescSV, InitBlock, Alias> 17357 ns 17356 ns 40244 412.539MB/s
4 years ago
Joshua Haberman
27b9c999a7
Merge pull request #338 from haberman/arena-initial
...
Start arena block doubling at initial block size.
4 years ago
Joshua Haberman
9df96874e9
Start arena block doubling at initial block size.
...
If an initial block is provided, we should start our
block doubling at the size of the initial block, not 128.
This saves us from unnecessary overhead when we overflow
the initial block.
4 years ago
Joshua Haberman
881ddac7fe
Also use .format() for gen_synthetic_protos.py.
4 years ago
Joshua Haberman
8b7dabe1a2
Use format() instead of string interpolation, for old Python versions.
4 years ago
Joshua Haberman
8e08282c3b
Removed unused small.proto.
4 years ago
Joshua Haberman
0f79d47215
Added missing lite binaries to size_data.txt.
4 years ago
Joshua Haberman
555fbbc0bc
Size benchmarks are working pretty well.
4 years ago
Joshua Haberman
85cbc41a89
Merge branch 'master' into size-benchmarks
4 years ago
Joshua Haberman
e5bdfba92c
Removed accidentally-added .orig file.
4 years ago
Joshua Haberman
07851fac58
Merge pull request #336 from haberman/fuzz
...
Fixed a few minor bugs found by fuzzing.
4 years ago
Joshua Haberman
982b634bc5
Fixed a few minor bugs found by fuzzing.
4 years ago
Joshua Haberman
c9d2e58480
Merge pull request #310 from haberman/fast-table
...
Fast table-driven parsing for upb (2+GB/s)
4 years ago
Joshua Haberman
a01f3e23a4
Fixes for google3 build, and exclude even more tests from macOS to avoid timeout.
4 years ago
Joshua Haberman
a83d55ee4b
Exclude Clang tests from MacOS to avoid Kokoro timeouts.
...
The real solution is to have each Kokoro build as part of a
separate job that runs in parallel.
4 years ago
Joshua Haberman
73fcfe9ed0
Tried to slim down the tests a bit more.
4 years ago
Joshua Haberman
baab25b7aa
Removed excess/redundant tests from Kokoro script.
4 years ago
Joshua Haberman
1eb7bd39e7
Some formatting fixes.
4 years ago
Joshua Haberman
9d87055ce4
Updated Kokoro build script.
4 years ago
Joshua Haberman
4bd34da105
WIP.
4 years ago
Joshua Haberman
a7993615bf
Merge branch 'master' into fast-table
4 years ago
Joshua Haberman
3a3efe69a2
Added incompatible_use_toolchain_transition = True per https://github.com/bazelbuild/bazel/issues/11584
4 years ago
Joshua Haberman
7b4e376f79
Switch unordered_set -> absl::flat_hash_set.
4 years ago
Joshua Haberman
fe62fc83e1
Removed obsolete includes in benchmark.
4 years ago
Joshua Haberman
5ed089dc42
Merge pull request #335 from haberman/wyhash-rule
...
Added a BUILD file for wyhash.
4 years ago
Joshua Haberman
e9b79542ad
Added a BUILD file for wyhash.
...
This will make the build more closely resemble the google3
build.
The CMake output from this is a bit busted, but the build
does succeed.
4 years ago
Joshua Haberman
7b8ae7ec4e
Merge branch 'master' into size-benchmarks
4 years ago
Joshua Haberman
a5b5445da6
Merge pull request #334 from haberman/rm-port-c
...
Removed obsolete port.c file.
4 years ago
Joshua Haberman
6c16cba83f
Removed obsolete port.c file.
4 years ago
Joshua Haberman
484d8f746a
Updated comment in wyhash.h to correct spelling mistake.
4 years ago
Joshua Haberman
6a9d0f45b8
Merge pull request #333 from haberman/32bitfixes
...
Fixed a critical bug on 32-bit builds, and added much more Kokoro testing
4 years ago
Joshua Haberman
5b1f0d86a1
For Kokoro, only build/test -m32 on Linux.
...
Also fixed a bunch of bugs found by gcc's -fanalyzer.
4 years ago
Joshua Haberman
0497f8deed
Fixed a critical bug on 32-bit builds, and added much more Kokoro testing.
...
There was a bug in our arena code where we assumed that
sizeof(upb_array) would be a multiple of 8. On i386 it was
not, and this was causing memory corruption on 32-bit builds.
4 years ago
Joshua Haberman
7543f851f1
Merge pull request #332 from haberman/php-amalgamation
...
Amalgamation no longer bundles wyhash, but #includes it.
4 years ago
Joshua Haberman
64abb5eb11
Amalgamation no longer bundles wyhash, but #includes it.
...
Also fixed a few spelling mistakes.
4 years ago
Joshua Haberman
a2a40792b5
Merge pull request #331 from haberman/json-oneof-fix
...
Bugfix for JSON decoding: only check real oneofs for duplicates.
4 years ago
Joshua Haberman
dd0994d377
Bugfix for JSON decoding: only check real oneofs for duplicates.
...
Also fixed upb_msg_whichoneof() to work properly for synthetic
fields, and to be simpler in general.
4 years ago
Joshua Haberman
496f638025
Merge pull request #330 from haberman/symtab-longjmp
...
symtab: use longjmp() for errors and avoid intermediate table.
4 years ago
Joshua Haberman
c9f9668234
symtab: use longjmp() for errors and avoid intermediate table.
...
We used to use a separate "add table" during the upb_symtab_addfile()
operation to make it easier to back out the file if it contained
errors. But this created unnecessary work of re-adding the same symbols
to the main symtab once everything was validated.
Instead we directly add symbols to the main symbols table. If there is
an error in validation, we remove precisely the set of symbols that
were already added.
This also requires using a separate arena for each file. We can fuse
it with the symtab's main arena if the operation is successful.
LoadDescriptor_Upb 61.2µs ± 4% 53.5µs ± 1% -12.50% (p=0.000 n=12+12)
LoadAdsDescriptor_Upb 4.43ms ± 1% 3.06ms ± 0% -31.00% (p=0.000 n=12+12)
LoadDescriptor_Proto2 257µs ± 0% 259µs ± 0% +1.00% (p=0.000 n=12+12)
LoadAdsDescriptor_Proto2 13.9ms ± 1% 13.9ms ± 1% ~ (p=0.128 n=12+12)
4 years ago
Joshua Haberman
4d9a8cd67b
Merge branch 'master' into symtab-longjmp
4 years ago
Joshua Haberman
6322d1d72d
Merge pull request #329 from haberman/benchmark-ads-descriptor
...
Added benchmark for loading ads descriptor.
4 years ago
Joshua Haberman
5ec1d39224
Avoid building .pb.cc for ads protos, as C++ takes forever to compile.
4 years ago
Joshua Haberman
43c207ea7e
Added CMake dummy rule.
4 years ago
Joshua Haberman
c3b5637646
Added benchmark for loading ads descriptor.
...
Generally this seems to track the speed of loading descriptor.proto.
----------------------------------------------------------------------------------------------------
Benchmark Time CPU Iterations
----------------------------------------------------------------------------------------------------
BM_LoadDescriptor_Upb 59091 ns 59086 ns 11747 121.182MB/s
BM_LoadAdsDescriptor_Upb 4218587 ns 4218582 ns 166 120.544MB/s
BM_LoadDescriptor_Proto2 241083 ns 241049 ns 2903 29.7043MB/s
BM_LoadAdsDescriptor_Proto2 13442631 ns 13442099 ns 52 34.8975MB/s
4 years ago
Joshua Haberman
acd72c6d3f
WIP.
4 years ago
Joshua Haberman
6ae3b66cd2
Merge pull request #328 from haberman/optdefload
...
Optimized the loading of descriptors
4 years ago
Joshua Haberman
8113ebd6c7
Added explanatory comment about integer constants.
4 years ago