benchmarking

Large public datasets? [closed]

…衆ロ難τιáo~ 提交于 2019-12-29 10:06:11
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I am looking for some large public datasets, in particular: Large sample web server logs that have been anonymized. Datasets used for database performance benchmarking. Any other links to large public datasets would be appreciated. I already know about Amazon's public datasets at: http://aws.amazon.com

Capturing (externally) the memory consumption of a given Callback

萝らか妹 提交于 2019-12-29 09:09:05
问题 The Problem Lets say I have this function: function hog($i = 1) // uses $i * 0.5 MiB, returns $i * 0.25 MiB { $s = str_repeat('a', $i * 1024 * 512); return substr($s, $i * 1024 * 256); } I would like to call it and be able to inspect the maximum amount of memory it uses. In other words: memory_get_function_peak_usage($callback); . Is this possible? What I Have Tried I'm using the following values as my non-monotonically increasing $i argument for hog() : $iterations = array_merge(range(0, 50,

Ruby attr_accessor vs. getter/setter benchmark: why is accessor faster?

半腔热情 提交于 2019-12-29 08:34:08
问题 I just tested attr_accessor against equivalent getter/setter-methods: class A # we define two R/W attributes with accessors attr_accessor :acc, :bcc # we define two attributes with getter/setter-functions def dirA=(d); @dirA=d; end def dirA; @dirA; end def dirB=(d); @dirB=d; end def dirB; @dirB; end end varA = A.new startT = 0 dirT = 0 accT = 0 # now we do 100 times the same benchmarking # where we do the same assignment operation # 50000 times 100.times do startT = Time.now.to_f 50000.times

node.js MySQL performance

ぐ巨炮叔叔 提交于 2019-12-29 03:22:26
问题 I am comparing node.js versus PHP in terms of write performance to MySQL database. I am using Apache Benchmark, linux Mint in virtual machine, newest mysql-server(5.5.43) and driver for MySQL with node.js from here. The code I used is server.js var http = require('http'); var mysql = require('mysql'); var server = http.createServer(function (req, res) { var connection = mysql.createConnection({ host : 'localhost', user : 'root', password : 'root', database : 'testDB' }); connection.connect();

Calculate time encryption of AES/CCM in Visual Studio 2017

孤人 提交于 2019-12-29 02:14:08
问题 I am using the library Crypto++ 5.6.5 and Visual Studio 2017. How can I calculate the encryption time for AES-CCM? 回答1: I would like to know how to calculate the encryption time for AES-CCM. The Crypto++ wiki provides an article Benchmarks. It provides a lot of details regarding library performance, how throughput is calculated, and it even references the source code where the actual throughput is measured. Believe it or not, a simple call to clock works just fine to measure bulk encryption.

Why is local variable access faster than class member access in Python?

我的梦境 提交于 2019-12-28 16:51:35
问题 While trying to tackle a more complex problem, I came to compare access speed to local variable vs member variables. Here a test program: #!/usr/bin/env python MAX=40000000 class StressTestMember(object): def __init__(self): self.m = 0 def do_work(self): self.m += 1 self.m *= 2 class StressTestLocal(object): def __init__(self): pass def do_work(self): m = 0 m += 1 m *= 2 # LOCAL access test for i in range(MAX): StressTestLocal().do_work() # MEMBER access test for i in range(MAX):

Benchmarking inside Java code

我是研究僧i 提交于 2019-12-28 13:24:29
问题 I have been looking into benchmarking lately, I have always been interested in logging program data etc. I was interested in knowing if we can implement our own memory usage code and implement our own time consumption code efficently inside our program. I know how to check long it takes for a code to run: public static void main(String[]args){ long start = System.currentTimeMillis(); // code System.out.println(System.currentTimeMillis() - start); } I also looked into Robust Java benchmarking,

Benchmarking inside Java code

只愿长相守 提交于 2019-12-28 13:23:28
问题 I have been looking into benchmarking lately, I have always been interested in logging program data etc. I was interested in knowing if we can implement our own memory usage code and implement our own time consumption code efficently inside our program. I know how to check long it takes for a code to run: public static void main(String[]args){ long start = System.currentTimeMillis(); // code System.out.println(System.currentTimeMillis() - start); } I also looked into Robust Java benchmarking,

Benchmarking inside Java code

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-28 13:23:23
问题 I have been looking into benchmarking lately, I have always been interested in logging program data etc. I was interested in knowing if we can implement our own memory usage code and implement our own time consumption code efficently inside our program. I know how to check long it takes for a code to run: public static void main(String[]args){ long start = System.currentTimeMillis(); // code System.out.println(System.currentTimeMillis() - start); } I also looked into Robust Java benchmarking,

MATLAB function is slow the first time, but much faster subsequently. Why?

馋奶兔 提交于 2019-12-28 12:48:34
问题 I have a large MATLAB function file. It first creates a zero matrix, then updates about 70% of the cells by evaluating a number of corresponding (long) algebraic expressions that are hard coded in the function. Once this is complete, a numeric matrix is returned. The .m file is about 4 MB large (I have 100 of these m. files, but that is not directly relevant). When I evaluate the function the first time, it takes about 9 seconds to evaluate. Subsequent runs, however, only take about 0.1