benchmarking

Why Android TimingLogger is not able to print logs?

不想你离开。 提交于 2020-01-01 08:04:16
问题 I am trying to use TimingLogger for checking time consumed for a particular method and its statements. But Android TimingLogger is not able to print logs. 回答1: If the Log.isLoggable is not enabled to at least the Log.VERBOSE level for that tag at creation time then the addSplit and dumpToLog call will do nothing. If you simply looking for logs as explained in https://developer.android.com, you will not be able to see logs. So use below command in adb: adb shell setprop log.tag.MyTag VERBOSE

Why Android TimingLogger is not able to print logs?

人盡茶涼 提交于 2020-01-01 08:04:06
问题 I am trying to use TimingLogger for checking time consumed for a particular method and its statements. But Android TimingLogger is not able to print logs. 回答1: If the Log.isLoggable is not enabled to at least the Log.VERBOSE level for that tag at creation time then the addSplit and dumpToLog call will do nothing. If you simply looking for logs as explained in https://developer.android.com, you will not be able to see logs. So use below command in adb: adb shell setprop log.tag.MyTag VERBOSE

Speed difference between AES/CBC encryption and decryption?

本秂侑毒 提交于 2020-01-01 05:48:08
问题 I am wondering, theoretically, how much slower would AES/CBC decryption be compared to AES/CBC encryption with the following conditions: Encryption key of 32 bytes (256 bits); A blocksize of 16 bytes (128 bits). The reason that I ask is that I want to know if the decryption speed of an implementation that I have is not abnormally slow. I have done some tests on random memory blocks of different sizes. The results are as follows: 64B: 64KB: 10MB – 520MB: All data was stored on the internal

Is my method of measuring running time flawed?

落花浮王杯 提交于 2019-12-31 19:50:11
问题 Sorry, it's a long one, but I'm just explaining my train of thought as I analyze this. Questions at the end. I have an understanding of what goes into measuring running times of code. It's run multiple times to get an average running time to account for differences per run and also to get times when the cache was utilized better. In an attempt to measure running times for someone, I came up with this code after multiple revisions. In the end I ended up with this code which yielded the results

Are Java 6's performance improvements in the JDK, JVM, or both?

 ̄綄美尐妖づ 提交于 2019-12-31 01:55:08
问题 I've been wondering about the performance improvements touted in Java SE 6 - is it in the compiler or the runtime? Put another way, would a Java 5 application compiled by JDK 6 see an improvement run under JSE 5 (indicating improved compiler optimization)? Would a Java 5 application compiled by JDK 5 see an improvement run under JSE 6 (indicating improved runtime optimization)? I've noticed that compiling under JDK 6 takes almost twice as long as it did under JDK 5 for the exact same codebase

Benchmarking : Same process multiple times, only one warmup?

淺唱寂寞╮ 提交于 2019-12-31 01:40:10
问题 I am currently working on a Java application (Benchmark) that has for purpose to mesure some processes relative to a database. My application is supposed to run has following : I have several Usecases (simple insert, simple update, etc., in a database) that I would like to run multiple times. The only difference between the runs, would be the number of threads running at the same time. I need to bench these usecases using 1, 2, 4, 8, 16, etc.. threads in order to include concurrency in my

Strange performance drop of JDK8 LocalDate.toEpochDay

自闭症网瘾萝莉.ら 提交于 2019-12-30 21:11:54
问题 I was curious if we finally get a fast datetime library with JDK8. Nearly all LocalDate computations use toEpochDay so I looked at the source and the large number of divisions and branches made me curious if I could do better. I eliminated some branching and all but one division, however the speedup is worse than expected. So my first question how is it possible that an algorithm using multiple division takes only about 30 cycles (throughput). Holger's comments seem to have answered this:

Which JS benchmark site is correct?

▼魔方 西西 提交于 2019-12-30 08:16:14
问题 I created a benchmark on both jsperf.com and jsben.ch, however, they're giving substantially different results. JSPerf: https://jsperf.com/join-vs-template-venryx JSBench: http://jsben.ch/9DaxR Note that the code blocks are exactly the same. On jsperf, block 1 is "61% slower" than the fastest: On jsbench, block 1 is only 32% slower than the fastest: ((99 - 75) / 75) What gives? I would expect benchmark sites to give the same results, at least within a few percent. As it stands, I'm unable to

benchmarking, code reordering, volatile

浪子不回头ぞ 提交于 2019-12-29 14:23:18
问题 I decide I want to benchmark a particular function, so I naïvely write code like this: #include <ctime> #include <iostream> int SlowCalculation(int input) { ... } int main() { std::cout << "Benchmark running..." << std::endl; std::clock_t start = std::clock(); int answer = SlowCalculation(42); std::clock_t stop = std::clock(); double delta = (stop - start) * 1.0 / CLOCKS_PER_SEC; std::cout << "Benchmark took " << delta << " seconds, and the answer was " << answer << '.' << std::endl; return 0

benchmarking, code reordering, volatile

萝らか妹 提交于 2019-12-29 14:21:05
问题 I decide I want to benchmark a particular function, so I naïvely write code like this: #include <ctime> #include <iostream> int SlowCalculation(int input) { ... } int main() { std::cout << "Benchmark running..." << std::endl; std::clock_t start = std::clock(); int answer = SlowCalculation(42); std::clock_t stop = std::clock(); double delta = (stop - start) * 1.0 / CLOCKS_PER_SEC; std::cout << "Benchmark took " << delta << " seconds, and the answer was " << answer << '.' << std::endl; return 0