benchmarking

Benchmarking, Profiling on Virtual Machines

妖精的绣舞 提交于 2019-12-24 11:01:05
问题 On many different sources you can read about time keeping issues in virtual machines. As every benchmark relies on time keeping i am not sure how to interpret e.g. apache benchmark or xdebug profiler results on vmware and how credible they are. http://communities.vmware.com/docs/DOC-5581 VMware suggests to build a special vm for performance testing. There are many tips in addition which seems to be workaround solutions (install VMware Tools, special configuration and so on). Especially when

What is going on in this java benchmark?

六眼飞鱼酱① 提交于 2019-12-24 07:03:22
问题 I'm using junit to run a primitive benchmark like this: @Test public void testTime() throws Exception{ LoadoutBase<?> loadout = new LoadoutStandard("AS7-D-DC"); final int iterations = 1000000; long start = System.nanoTime(); int sum = 0; for(int i = 0; i < iterations; ++i){ Iterator<Item> it = loadout.iterator(); while( it.hasNext() ){ sum += it.next().getNumCriticalSlots(); } } long end = System.nanoTime(); long time_it = end - start; start = System.nanoTime(); sum = 0; for(int i = 0; i <

Benchmarking RAM performance - UWP and C#

我们两清 提交于 2019-12-24 03:48:06
问题 I'm developing a benchmarking application using Universal Windows Platform that evaluates CPU and RAM performance of a Windows 10 system. Although I found different algorithms to benchmark a CPU, I still didn't found any solid algorithm or solution to evaluate the write and read speeds of memory. How can I achieve this in C#? Thanks in advance :) 回答1: I don't see why this would not be possible from managed code. Array access code turns into normal x86 memory instructions. It's a thin

How can I check how many times a function was called with a 3 seconds interval?

空扰寡人 提交于 2019-12-24 01:56:19
问题 I would like to check how many times my function can be run in 3 seconds. I wrote that code: #include <string.h> #include <stdlib.h> #include <stdio.h> #include <time.h> #include <sys/time.h> #include <sys/resource.h> double get_wall_time(){ struct timeval time; if (gettimeofday(&time,NULL)){ // Handle error return 0; } return (double)time.tv_sec + (double)time.tv_usec * .000001; } int main(int argc, char **argv) { long iterations = 0; double seconds = 3.0; double wall0 = get_wall_time(), now

Why do two consecutive calls to the same method yield different times for execution?

假如想象 提交于 2019-12-24 00:59:27
问题 Here is a sample code: public class TestIO{ public static void main(String[] str){ TestIO t = new TestIO(); t.fOne(); t.fTwo(); t.fOne(); t.fTwo(); } public void fOne(){ long t1, t2; t1 = System.nanoTime(); int i = 10; int j = 10; int k = j*i; System.out.println(k); t2 = System.nanoTime(); System.out.println("Time taken by 'fOne' ... " + (t2-t1)); } public void fTwo(){ long t1, t2; t1 = System.nanoTime(); int i = 10; int j = 10; int k = j*i; System.out.println(k); t2 = System.nanoTime();

why is new Array slow?

佐手、 提交于 2019-12-23 18:39:22
问题 when comparing the operation var fat_cats = cats.slice() to var fat_cats = new Array(cats.length) the performance differences are confusing. In firefox and chrome new Array is slower (when it should be faster, it's just allocating an empty array and not doing iteration over it) Where as in IE8 new Array is faster (which is just confusing) Any explanation appreciated. benchmark 回答1: Figured it out by looking at the source code for V8's array functions. If an array has more than 1000 elements

Benchmarking programs on Linux

笑着哭i 提交于 2019-12-23 17:43:01
问题 for an assignment we need to benchmark our implementations with different optimizations and parameters. Is there a feasible way of benchmarking little programs on the linux command line (I know of time) with different parameters which gives me the time data as CSV or something similiar? Output could be something like: Implementation Time A 23s B with -O3 2Threads 15s B with -O3 4Threads 10s I'm pretty sure that I've seen something like that on some professors slides but I cant remember who or

Trivial mathematical problems as language benchmarks

↘锁芯ラ 提交于 2019-12-23 15:18:00
问题 Why do people insist on using trivial mathematical problems like finding numbers in the Fibonacci sequence for language benchmarks? Don't these usually get optimized to relativistic speeds? Isn't the brunt of the bottlenecks usually in I/O, system API calls, operations on strings and structures, processing large quantities of data, abstract object-oriented stuff, etc? 回答1: It is a throwback to the old days, when compiler technology for what we would now call basic math was still evolving

Resulting EXE speed for C++ under VS2005, VS2008; VS2010 compilers

寵の児 提交于 2019-12-23 12:43:06
问题 When I upgraded from VS6 to VS2005, I saw a 10% boost in the speed of my chess engine program with the default compile settings. Wondering if the same is true in general, and what improvements, if any, have been made to the final output of the MS C++ compiler since then. 回答1: Regarding moving to VC++ 2010+ from versions of VC++ prior to 2010: If you make heavy use of the STL containers and algorithms, upgrading to VC++ 2010+ may provide substantially more than just a 10% improvement, as VC++

Performance difference between MRI Ruby and jRuby

怎甘沉沦 提交于 2019-12-23 10:44:02
问题 While doing some benchmarking to answer this question about the fastest way to concatenate arrays I was surprised that when I did the same benchmarks in with jRuby the tests were a lot slower. Does this mean that the old adagio about jRuby being faster than MRI Ruby is gone ? Or is this about how arrays are treated in jRuby ? Here the benchmark and the results in both MRI Ruby 2.3.0 and jRuby 9.1.2.0 Both run on a 64bit Windows 7 box, all 4 processors busy for 50-60%, memory in use ± 5.5GB.