Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 534 by [email protected]: Speed up readRawVarint32 by >30%
http://code.google.com/p/protobuf/issues/detail?id=534
Attached is a patch that applies on top of r497 and a Caliper benchmark.
The Caliper benchmark is showing a consistent >30% improvement. This is
really a micro-optimization but because this is in the fast path of almost
everything, I thought you'd consider including it upstream.
Environment: OS X 10.8.3, Java 1.6.0_45, Intel i7-3615QM @ 2.30GHz
0% Scenario{vm=java, trial=0, benchmark=Tsuna} 6.69 ns; σ=0.07 ns @ 4
trials
50% Scenario{vm=java, trial=0, benchmark=Google} 10.60 ns; σ=0.09 ns @ 3
trials
benchmark ns linear runtime
Tsuna 6.68 ==================
Google 10.60 ==============================
=> 37% faster
Environment: Linux 3.4.24, Java 1.6.0_20, Dual Intel E5-2620 @ 2.00GHz
0% Scenario{vm=java, trial=0, benchmark=Tsuna} 8.94 ns; σ=0.03 ns @ 3
trials
50% Scenario{vm=java, trial=0, benchmark=Google} 13.32 ns; σ=0.06 ns @ 3
trials
benchmark ns linear runtime
Tsuna 8.94 ====================
Google 13.38 ==============================
=> 33% faster
Attachments:
0001-Speed-up-readRawVarint32-by-40.patch 2.5 KB
varint.java 2.4 KB
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups "Protocol
Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/groups/opt_out.