profiling

Python's [<generator expression>] at least 3x faster than list(<generator expression>)?

試著忘記壹切 提交于 2019-12-30 00:59:11
问题 It appears that using [] around a generator expression (test1) behaves substantially better than putting it inside of list() (test2). The slowdown isn't there when I simply pass a list into list() for shallow copy (test3). Why is this? Evidence: from timeit import Timer t1 = Timer("test1()", "from __main__ import test1") t2 = Timer("test2()", "from __main__ import test2") t3 = Timer("test3()", "from __main__ import test3") x = [34534534, 23423523, 77645645, 345346] def test1(): [e for e in x]

Javascript memory and leak problems

本小妞迷上赌 提交于 2019-12-29 17:44:10
问题 My site is pretty standard ecom site, it isn't a JS backed standalone app or anything, it's just a site which uses JS for standard stuff, as well as some jquery plugins to do a few things. I'm trying to do some JS memory evaluation on my site. I've done this by looking at the Chrome Task Manager and through Heap Snapshots. Initailly my site on first load sits between 35MB (i.e 35,000K) and 40MB on the task manager. This is the largest of any tab, if I have several tabs of other websites open

How do you measure actual on-CPU time for an iOS thread?

爱⌒轻易说出口 提交于 2019-12-29 06:19:14
问题 I am looking for an iOS analog for Android's SystemClock.currentThreadTimeMillis() or Microsoft's GetThreadTimes() or Posix clock_gettime(CLOCK_THREAD_CPUTIME_ID, ) and pthread_getcpuclockid() functions to measure the actual "clean" time used by a function in a multithreaded application. That is, I don't want to measure the actual wall clock time spent in a function, but the on-CPU time. I found interesting discussions about this here on stackoverflow and elsewhere. Unfortunately, neither

How do you measure actual on-CPU time for an iOS thread?

≯℡__Kan透↙ 提交于 2019-12-29 06:19:12
问题 I am looking for an iOS analog for Android's SystemClock.currentThreadTimeMillis() or Microsoft's GetThreadTimes() or Posix clock_gettime(CLOCK_THREAD_CPUTIME_ID, ) and pthread_getcpuclockid() functions to measure the actual "clean" time used by a function in a multithreaded application. That is, I don't want to measure the actual wall clock time spent in a function, but the on-CPU time. I found interesting discussions about this here on stackoverflow and elsewhere. Unfortunately, neither

Logging erroneous queries only on SQL server

﹥>﹥吖頭↗ 提交于 2019-12-29 05:34:10
问题 I have what would seem to be an easy goal to accomplish, yet I have not found a good solution. Google does not shed a light on it and I just hope that I have been looking for a solution in wrong places or just tried to use tools in a wrong way... Or perhaps it is already too late for me today to think clearly :) But this is where you can help me out, I hope. I need to be able to log erroneous queries only which were executed on a specific instance of SQL Server. I thought that SQL Profiler

How to calculate the achieved bandwidth of a CUDA kernel

自闭症网瘾萝莉.ら 提交于 2019-12-29 05:00:08
问题 I want a measure of how much of the peak memory bandwidth my kernel archives. Say I have a NVIDIA Tesla C1060, which has a max Bandwidth of 102.4 GB/s. In my kernel I have the following accesses to global memory: ... for(int k=0;k>4000;k++){ float result = (in_data[index]-loc_mem[k]) * (in_data[index]-loc_mem[k]); .... } out_data[index]=result; out_data2[index]=sqrt(result); ... I count for each thread 4000*2+2 accesses to global memory. Having 1.000.000 threads and all accesses are float I

Profiling template metaprogram compilation time

萝らか妹 提交于 2019-12-29 04:34:25
问题 I'm working on a C++ project with extensive compile-time computations. Long compilation time is slowing us down. How might I find out the slowest parts of our template meta-programs so I can optimize them? (When we have slow runtime computations, I have many profilers to choose from, e.g. valgrind's callgrind tool. So I tried building a debug GCC and profiling it compiling our code, but I didn't learn much from that.) I use GCC and Clang, but any suggestions are welcome. I found profile

accurately measure time python function takes

我怕爱的太早我们不能终老 提交于 2019-12-28 08:07:12
问题 I need to measure the time certain parts of my program take (not for debugging but as a feature in the output). Accuracy is important because the total time will be a fraction of a second. I was going to use the time module when I came across timeit, which claims to avoid a number of common traps for measuring execution times . Unfortunately it has an awful interface, taking a string as input which it then eval's. So, do I need to use this module to measure time accurately, or will time

Where is the Query Analyzer in SQL Server Management Studio 2008 R2?

假装没事ソ 提交于 2019-12-28 05:36:05
问题 I have some SQL thats getting run and it is taking to long to return the results / parse / display, etc. in a asp.net c# application. I have SQL Server Management Studio 2008 R2 installed to connect to a remote SQL Server 2000 machine. Is there a Query Analyzer or profiler I can use to see whats going on? I'm not sure if I'm sending too many requests, if the requests are taking too long, if there are additional indexes I can add to speed things up etc. EDIT: Any free tools out there that are

What are some good profilers for native C++ on Windows? [closed]

纵然是瞬间 提交于 2019-12-28 05:33:04
问题 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 3 years ago . I'm looking for a profiler to use with native C++. It certainly does not have to be free, however cost does factor into the purchase decision. This is for commercial work so I can't use personal or academic licensed copies. The key features I'm looking for are: Process level metrics Component level metrics Line