benchmarking

Benchmark Linq2SQL, Subsonic2, Subsonic3 - Any other ideas to make them faster?

故事扮演 提交于 2019-11-27 03:57:20
问题 I am working with Subsonic 2 more than 3 years now... After Linq appears and then Subsonic 3, I start thinking about moving to the new Linq futures that are connected to sql. I must say that I start move and port my subsonic 2 with SubSonic 3, and very soon I discover that the speed was so slow thats I didn't believe it - and starts all that tests. Then I test Linq2Sql and see also a delay - compare it with Subsonic 2. My question here is, especial for the linq2sql, and the up-coming dotnet

Java benchmarking - why is the second loop faster?

感情迁移 提交于 2019-11-27 03:42:48
I'm curious about this. I wanted to check which function was faster, so I create a little code and I executed a lot of times. public static void main(String[] args) { long ts; String c = "sgfrt34tdfg34"; ts = System.currentTimeMillis(); for (int k = 0; k < 10000000; k++) { c.getBytes(); } System.out.println("t1->" + (System.currentTimeMillis() - ts)); ts = System.currentTimeMillis(); for (int i = 0; i < 10000000; i++) { Bytes.toBytes(c); } System.out.println("t2->" + (System.currentTimeMillis() - ts)); } The "second" loop is faster, so, I thought that Bytes class from hadoop was faster than

Why is my program so slow?

巧了我就是萌 提交于 2019-11-27 03:26:25
问题 Someone decided to do a quick test to see how native client compared to javascript in terms of speed. They did that by running 10 000 000 sqrt calculations and measuring the time it took. The result with javascript: 0.096 seconds, and with NaCl: 4.241 seconds... How can that be? Isn't speed one of the reasons to use NaCl in the first place? Or am i missing some compiler flags or something? Heres the code that was run: clock_t t = clock(); float result = 0; for(int i = 0; i < 10000000; ++i) {

Python Requests vs PyCurl Performance

ぃ、小莉子 提交于 2019-11-27 03:20:35
How does the Requests library compare with the PyCurl performance wise? My understanding is that Requests is a python wrapper for urllib whereas PyCurl is a python wrapper for libcurl which is native, so PyCurl should get better performance, but not sure by how much. I can't find any comparing benchmarks. I wrote you a full benchmark , using a trivial Flask application backed by gUnicorn/meinheld + nginx (for performance and HTTPS), and seeing how long it takes to complete 10,000 requests. Tests are run in AWS on a pair of unloaded c4.large instances, and the server instance was not CPU

Python Numpy Data Types Performance

混江龙づ霸主 提交于 2019-11-27 03:06:44
问题 So I did some testing and got odd results. Code: import numpy as np import timeit setup = """ import numpy as np A = np.ones((1000,1000,3), dtype=datatype) """ datatypes = "np.uint8", "np.uint16", "np.uint32", "np.uint64", "np.float16", "np.float32", "np.float64" stmt1 = """ A = A * 255 A = A / 255 A = A - 1 A = A + 1 """ #~ np.uint8 : 1.04969205993 #~ np.uint16 : 1.19391073202 #~ np.uint32 : 1.37279821351 #~ np.uint64 : 2.99286961148 #~ np.float16 : 9.62375889588 #~ np.float32 : 0

How efficient can Meteor be while sharing a huge collection among many clients?

◇◆丶佛笑我妖孽 提交于 2019-11-27 02:33:41
Imagine the following case: 1,000 clients are connected to a Meteor page displaying the content of the "Somestuff" collection. "Somestuff" is a collection holding 1,000 items. Someone inserts a new item into the "Somestuff" collection What will happen: All Meteor.Collection s on clients will be updated i.e. the insertion forwarded to all of them (which means one insertion message sent to 1,000 clients) What is the cost in term of CPU for the server to determine which client needs to be updated? Is it accurate that only the inserted value will be forwarded to the clients, and not the whole list

How can I benchmark JavaScript code? [closed]

别说谁变了你拦得住时间么 提交于 2019-11-27 02:31:29
Is there a package that helps me benchmark JavaScript code? I'm not referring to Firebug and such tools. I need to compare 2 different JavaScript functions that I have implemented. I'm very familiar with Perl's Benchmark ( Benchmark.pm ) module and I'm looking for something similar in JavaScript. Has the emphasis on benchmarking JavaScript code gone overboard? Can I get away with timing just one run of the functions? Just time several iterations of each function. One iteration probably won't be enough, but (depending on how complex your functions are) somewhere closer to 100 or even 1,000

Is there any simple way to benchmark python script?

安稳与你 提交于 2019-11-27 02:27:14
Usually I use shell command time . My purpose is to test if data is small, medium, large or very large set, how much time and memory usage will be. Any tools for linux or just python to do this? exhuma Have a look at timeit , the python profiler and pycallgraph . timeit def test(): """Stupid test function""" lst = [] for i in range(100): lst.append(i) if __name__ == '__main__': import timeit print(timeit.timeit("test()", setup="from __main__ import test")) Essentially, you can pass it python code as a string parameter, and it will run in the specified amount of times and prints the execution

What does “an intermediate result is being cached” mean?

我们两清 提交于 2019-11-27 01:56:05
I have a set of n vectors stored in the 3 x n matrix z . I find the outer product using np.einsum . When I timed it using: %timeit v=np.einsum('i...,j...->ij...',z,z) I got the result: The slowest run took 7.23 times longer than the fastest. This could mean that an intermediate result is being cached 100000 loops, best of 3: 2.9 µs per loop What is happening here and can it be avoided? The best 3 is 2.9us, but the slowest maybe more typical. The message "intermediate result is being cached" is just a blind guess in the canned message reported by %timeit. It may or may not be true, and you

Benchmarking Java programs

安稳与你 提交于 2019-11-27 01:24:12
问题 For university, I perform bytecode modifications and analyze their influence on performance of Java programs. Therefore, I need Java programs---in best case used in production---and appropriate benchmarks. For instance, I already got HyperSQL and measure its performance by the benchmark program PolePosition. The Java programs running on a JVM without JIT compiler. Thanks for your help! P.S.: I cannot use programs to benchmark the performance of the JVM or of the Java language itself (such as