summaryrefslogtreecommitdiffstats
path: root/core/tests/benchmarks/src/android
Commit message (Collapse)AuthorAgeFilesLines
* Create a Benchmark test for NetworkStats.Wenchao Tong2015-03-231-0/+82
| | | | | Bug: 19536273 Change-Id: I438ed3affa799612566b04e324e43bc5ea74079f
* Replacing FloatMath native implementation with calls to MathNick Kralevich2014-10-201-0/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On modern versions of Android running in AOT mode FloatMath is slower than Math. Calls to Math.sqrt(), etc. are replaced by intrinsics which can be as small as a single CPU opcode. When running in interpreted mode the new implementation is unfortunately slower, but I'm judging this acceptable and likely to be improved over time. This change saves a small amount of native code. Example timings: Mako AOSP AOT: Method: Original / New / Direct call to Math ceil: 596ns / 146.ns / 111ns sqrt: 694ns / 56ns / 25ns Mako AOSP interpreted: Method: Original / New / Direct call to Math ceil: 1900ns / 2307ns / 1485ns sqrt: 1998ns / 2603ns / 1788ns Other calls Mako AOT: Method: Original / New cos: 635ns / 270ns exp: 566ns / 324ns floor: 604ns / 150ns hypot: 631ns / 232ns pow: 936ns / 643ns sin: 641ns / 299ns The advice to use Math directly, in preference to FloatMath, is still good. FloatMath will be deprecated separately. Bug: https://code.google.com/p/android/issues/detail?id=36199 Change-Id: If07fcbd78543d13bc6d75f9743f999860e8d58d7
* Cache AndroidBlockGuardPolicy to avoid allocation.Jeff Sharkey2013-06-141-0/+34
| | | | | | | | | | | | | Every incoming Binder call ends up triggering a BlockGuardPolicy update, which would thrash between new AndroidBlockGuardPolicy instances and BlockGuard.LAX_POLICY, causing GC churn. This change avoids the extra allocations by recycling a single AndroidBlockGuardPolicy in a ThreadLocal. Worst-case thrashing case is now 10% faster; from 7.46us to 6.65us. Bug: 9424568 Change-Id: I9c3b1c097a2aecc9b1f109a824cf3ea319fb3393
* Improve TrafficStats UID APIs.Jeff Sharkey2013-02-071-0/+39
| | | | | | | | | | | | Deprecate transport layer statistics, leaving only the summarized network layer statistics. Improve documentation to be clear about layers where measurements occur, and their behavior since boot. Under the hood, move to using xt_qtaguid UID statistics. Bug: 6818637, 7013662 Change-Id: I9f26992e5fcdebd88c671e5765bd91229e7b0016
* Caliper benchmarks for Parcel.Jeff Sharkey2012-03-062-0/+199
Bug: 6111276 Change-Id: I4b89e4c14d2dc20e71bbaed78f285e6d539a1f0f