From 1e388b0af3d7c2384cd350a349ba756914620466 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Mon, 20 Jul 2009 10:52:37 -0700 Subject: Significant, experimental changes (setjmp/longjmp, group handling). --- benchmark/benchmark.cc | 30 ++++----- benchmark/google_messages.proto.bin | 130 ------------------------------------ 2 files changed, 15 insertions(+), 145 deletions(-) delete mode 100644 benchmark/google_messages.proto.bin (limited to 'benchmark') diff --git a/benchmark/benchmark.cc b/benchmark/benchmark.cc index 10713a8..95709bc 100644 --- a/benchmark/benchmark.cc +++ b/benchmark/benchmark.cc @@ -73,19 +73,19 @@ int main () upb_msgdata_free(data, m, true); upb_context_free(&c); - benchmarks::SpeedMessage2 msg; - std::string stlstr(str.ptr, str.byte_len); - upb_strfree(str); - total = 0; - before = clock(); - for(int i = 0; i < 2000; i++) { - if(!msg.ParseFromString(stlstr)) { - fprintf(stderr, "Error parsing with proto2.\n"); - return 1; - } - total += str.byte_len; - } - elapsed = ((double)clock() - before) / CLOCKS_PER_SEC; - fprintf(stderr, "proto2 parsed %sB, ", eng(total, 3, false)); - fprintf(stderr, "%sB/s\n", eng(total/elapsed, 3, false)); + //benchmarks::SpeedMessage2 msg; + //std::string stlstr(str.ptr, str.byte_len); + //upb_strfree(str); + //total = 0; + //before = clock(); + //for(int i = 0; i < 2000; i++) { + // if(!msg.ParseFromString(stlstr)) { + // fprintf(stderr, "Error parsing with proto2.\n"); + // return 1; + // } + // total += str.byte_len; + //} + //elapsed = ((double)clock() - before) / CLOCKS_PER_SEC; + //fprintf(stderr, "proto2 parsed %sB, ", eng(total, 3, false)); + //fprintf(stderr, "%sB/s\n", eng(total/elapsed, 3, false)); } diff --git a/benchmark/google_messages.proto.bin b/benchmark/google_messages.proto.bin deleted file mode 100644 index 0531d7e..0000000 --- a/benchmark/google_messages.proto.bin +++ /dev/null @@ -1,130 +0,0 @@ - -ï -google_speed.proto -benchmarks"ø - SpeedMessage1 -field1 (  -field9 (  -field18 (  -field80P (:false -field81Q (:true -field2 ( -field3 ( -field280˜ ( -field6 (:0 -field22 ( -field4 (  -field5 ( -field59; (:false -field7 (  -field16 ( -field130‚ (:0 -field12 (:true -field17 (:true -field13 (:true -field14 (:true -field104h (:0 -field100d (:0 -field101e (:0 -field102f (  -field103g (  -field29 (:0 -field30 (:false -field60< (:-1 -field271 (:-1 -field272 (:-1 -field150– ( -field23 (:0 -field24 (:false -field25 (:04 -field15 ( 2#.benchmarks.SpeedMessage1SubMessage -field78N ( -field67C (:0 -field68D ( -field128€ (:0( -field129 ( :xxxxxxxxxxxxxxxxxxxxx -field131ƒ (:0"¢ -SpeedMessage1SubMessage -field1 (:0 -field2 (:0 -field3 (:0 -field15 (  -field12 (:true -field13 ( -field14 ( -field16 ( -field19 (:2 -field20 (:true -field28 (:true -field21 ( -field22 ( -field23 (:false -field206Î (:false -field203Ë ( -field204Ì ( -field205Í (  -field207Ï ( -field300¬ ("Ê - SpeedMessage2 -field1 (  -field3 ( -field4 ( -field30 ( -field75K (:false -field6 (  -field2 (  -field21 (:0 -field71G ( -field25 ( -field109m (:0 -field210Ò (:0 -field211Ó (:0 -field212Ô (:0 -field213Õ (:0 -field216Ø (:0 -field217Ù (:0 -field218Ú (:0 -field220Ü (:0 -field221Ý (:0 -field222Þ (:0 -field63? (0 -group1 - ( -2 .benchmarks.SpeedMessage2.Group1 -field128€ (  -field131ƒ ( -field127 (  -field129 ( -field130‚ ( -field205Í (:false -field206Î (:falseà -Group1 -field11 ( -field26 ( -field12 (  -field13 (  -field14 (  -field15 ( -field5 ( -field27 (  -field28 ( -field29 (  -field16 (  -field22 (  -field73I ( -field20 (:0 -field24 ( 8 -field31 ( 2'.benchmarks.SpeedMessage2GroupedMessage"ß -SpeedMessage2GroupedMessage -field1 ( -field2 ( -field3 (:0 -field4 ( -field5 ( -field6 (:true -field7 (:false -field8 ( -field9 ( -field10 - ( -field11 ( \ No newline at end of file -- cgit v1.2.3