benchmarking

What are good test cases for benchmarking & stress testing substring search algorithms?

拟墨画扇 提交于 2019-12-12 09:39:07
问题 I'm trying to evaluate different substring search (ala strstr) algorithms and implementations and looking for some well-crafted needle and haystack strings that will catch worst-case performance and possible corner-case bugs. I suppose I could work them out myself but I figure someone has to have a good collection of test cases sitting around somewhere... 回答1: Some thoughts and a partial answer to myself: Worst case for brute force algorithm: a^(n+1) b in (a^n b)^m e.g. aaab in

How to benchmark a SQL Server Query?

故事扮演 提交于 2019-12-12 07:54:20
问题 I'd like to know the standard way to benchmark a SQL Sever Query, preferably I'd like to know about the tools that come with SQL Server rather than 3rd Party tools. 回答1: set showplan_text on will show you the execution plan (to see it graphically use CTRL + K (sql 2000) or CTRL + M (sql 2005 +) set statistics IO on will show you the reads set statistics time on will show you the elapsed time 回答2: Use SQL Profiler. For .NET applications, filter that Application name by '.NET%' and you'll omit

How can I benchmark the performance of C++ code? [closed]

情到浓时终转凉″ 提交于 2019-12-12 07:35:27
问题 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 last year . I am starting to study algorithms and data structures seriously, and interested in learning how to compare the performance of the different ways I can implement A&DTs. For simple tests, I can get the time before/after something runs, run that thing 10^5 times, and average the running times. I can parametrize input

Timing of parallel actions using the Task Parallel Library in C#

前提是你 提交于 2019-12-12 02:29:22
问题 I am running some experiments, timing them and comparing the times to find the best "algorithm". The question that came up was if running the tasks in parallel would make the relative runningtimes of the experiments wrong and if I would get more representative results by running them sequentially. Here is a (simplified) version of the code: public static void RunExperient(IEnumerable<Action> experiments) { Parallel.ForEach(experiments, experiment => { var sw = Stopwatch.StartNew(); //line 1

Unable to see any results when benchmarking optaplanner

[亡魂溺海] 提交于 2019-12-12 01:45:27
问题 I am trying to benchmark in Optaplanner, and I am not seeing any results. My directories are all created, however, there are no files and there is no html file for me to view any graphs. Below is an outline of my implementation, can you assist in helping me figure out what I am doing wrong? I added the following to VehicleRoutingApp.class in main() PlannerBenchmarkFactory plannerBenchmarkFactory = PlannerBenchmarkFactory.createFromXmlResource( "org/optaplanner/examples/vehiclerouting

JavaScript: Out of Memory for huge result array in Sieve of Atkin implementation

微笑、不失礼 提交于 2019-12-11 15:13:37
问题 Currently I'm running some benchmarks between JavaScript, asm.js and WebAssembly. For that I've implemented a little program that searches for primes with the Sieve of Atkin algorithm. To make the ramp up negligible I'm calculating primes up to 500'000'000. My problem is, that the JavaScript implementation runs out of memory, because the result array becomes huge. That's my current implementation: const AMOUNT = 500000000; function getPrimes() { const limit = AMOUNT; const width = Math.sqrt

How to use stack bench

醉酒当歌 提交于 2019-12-11 13:46:02
问题 I've been playing around with using stack for a little haskell application, so far I have been able to build and test fine and was interested in looking at performance so tried stack bench however this is all that seems to happen: c:\Users\jk\projects\foo>stack bench stack bench I don't think it can have done anything? My application does not appear to have run. Presuembly there is some configuration I am missing? 回答1: stack bench will run any benchmark suites defined in your foo.cabal file.

Benchmarks for CPython

喜欢而已 提交于 2019-12-11 13:38:09
问题 I'm investigating a potential change in the CPython code base which I'm hoping may provide some performance benefits. However, though there are plenty of functionality tests in the build system, I can find nothing to do with performance testing. I would think that this would be ideal in order to check both whether: any proposed performance improvements actually deliver what they intend; and whether any functionality changes cause serious performance issues. Have I missed something in the repo

How can I benchmark signature algorithms (HMAC vs RSA) and compare them well?

丶灬走出姿态 提交于 2019-12-11 13:08:59
问题 I would like to kind of re-ask a question that was asked here two years ago (Benchmarking symmetric and asymmetric cryptography) but, as I find, was not satisfyingly answered. 1) I too would really like to back up the notion that RSA-like asymmetric cryptography is much more expensive than for example performing an HMAC operation with hard numbers. These numbers should be informative with regard to comparability of algorithms. 2) Moreover, I would be interested, in addition to mere mean

Benchmarking symmetric and asymmetric cryptography

别等时光非礼了梦想. 提交于 2019-12-11 12:03:08
问题 In order to integrity protect a byte stream one can conceptually either use symmetric cryptography (e.g. an HMAC with SHA-1) or asymmetric cryptography (e.g. digital signature with RSA). It is common sense that asymmetric cryptography is much more expensive than using symmetric cryptography. However, I would like to have hard numbers and would like to know whether there exist benchmark suites for existing crypto libraries (e.g. openssl) in order to gain some measurement results for symmetric