Do sealed classes really offer performance Benefits?

I have come across a lot of optimization tips which say that you should mark your classes as sealed to get extra performance benefits. I ran some tests to check the performance differential and...

What is the best way to paginate results in SQL Server

What is the best way (performance wise) to paginate results in SQL Server 2000, 2005, 2008, 2012 if you also want to get the total number of results (before paginating)?

Which method performs better: .Any() vs .Count() > 0?

in the System.Linq namespace, we can now extend our IEnumerable's to have the Any() and Count() extension methods. I was told recently that if i want to check that a collection contains 1 or more...

Windows application very slow when using transparency

I am writing a windows application with C# in visual studio .net 2005. In the form , there are some control with transparent Background; the form opens maximised and with full screen...

Development time in various languages

Does anybody know of any research or benchmarks of how long it takes to develop the same application in a variety of languages? Really I'm looking for Java vs. C++ but any comparisons would be...

Performance of reading a registry key?

I'm wondering how long it takes (in milliseconds) to read a registry value from the Windows registry through standard C# libraries. In this case, I'm reading in some proxy settings. What order of...

What are implications of SET-ting ALLOW_SNAPSHOT_ISOLATION ON?

Should I run ALTER DATABASE DbName SET ALLOW_SNAPSHOT_ISOLATION OFF if snapshot transaction (TX) isolation (iso) is not temporarily used? In other words, why should it be enabled, in first...

Setting properties via object initialization or not : Any difference ?

Here's a simple question : Is there any (performance) difference between this : Person person = new Person() { Name = "Philippe", Mail = "[email protected]", }; and this Person person = new...

Complexity of list.index(x) in Python

I'm referring to this: http://docs.python.org/tutorial/datastructures.html What would be the running time of list.index(x) function in terms of Big O notation?

What does skew mean in the context of performance engineering

This word is being used in software performance discussions. I searched on google for its meaning but no success.

JMeter understanding ramp-up

This is the configuration of my test plan thread properties: Number of Threads (users): 100 Ramp-up Period (in seconds): 10 Loop Count : Forever Delay thread creation until...

Why is my Rust program slower than the equivalent Java program?

I was playing around with binary serialization and deserialization in Rust and noticed that binary deserialization is several orders of magnitude slower than with Java. To eliminate the...

Convert matlab.double array to python array

I am using the matlab python engine to access data from my matlab projects in python. This works quite well, but I do have a problem to efficiently use the matlab arrays in python. For example I...

The differences between INT and UUID in MySQL

If I set the primary key to be INT type (AUTO_INCREMENT) or set it in UUID, what is the difference between these two in the database performance (SELECT, INSERT etc) and why?

How to time functions in JavaScript similar to Python timeit

How can I measure the execution time of functions in JavaScript? Preferably similar to Python timeit.

Efficient sqlite query based on list of primary keys

For querying an sqlite table based on a list of IDs (i.e. distinct primary keys) I am using following statement (example based on the Chinook Database): SELECT * FROM Customer WHERE CustomerId...

R data.table within for loop runs very slow

I have 100,000 users each with a time series of about 1,000 time series values that I would like to calculate metrics for. Unfortunately my existing code runs very slow, I believe mainly due to...

Mysql "memory usage" increasing and increasing

I have a really big website built old fashioned with PHP & MYSQL. I have more than 1,000 different queries in my website, on different PHP pages, and it's really hard to update all of them to...

Most efficient way to forward-fill NaN values in numpy array

Example Problem As a simple example, consider the numpy array arr as defined below: import numpy as np arr = np.array([[5, np.nan, np.nan, 7, 2], [3, np.nan, 1, 8, np.nan], ...

lapply vs for loop - Performance R

It is often said that one should prefer lapply over for loops. There are some exception as for example Hadley Wickham points out in his Advance R book. (http://adv-r.had.co.nz/Functionals.html)...

Docker Wordpress super slow

I have Wordpress running inside Docker, for local development, and it's super slow. My docker-compose.yml looks like this: version: '3.3' services: db: image: mysql:5.7 volumes: -...

How to boost MIT Scratch 3 performance in "full screen" mode?

I am using the version 3 of MIT-Scratch to create a simple game. It's running smooth in the (smaller) editor view, but it hast quite significant lag (only a few fps) in the full screen mode, on...

Processes are running slow in docker container on ubuntu 18.04

Processes are taking time when running them in a docker container on ubuntu 18 machine. But the same process with the same docker version is running fine on ubuntu 16 machine. I have a node...

How to save list of objects using bulk_update method in Django?

I have a loop iterating over objects and adding them to the list for note in notes: old_note = Note( user_id=note['id']), ...

Performance issue with CountDiv (Codility) challenge algorithm

Needing some help with the algorithm i made to solve this codility challenge : Write a function that, given three integers A, B and K, returns the number of integers within the range [A..B] that...

Chrome + Dev Tools poor performance

That's the test page for this issue: https://kasheftin.github.io/chrome-vue-draggable-performance/ Basically, it's just 10000 divs + simple drag-scroll plugin. I'm trying to find the reason of...

Execution failed for task ':app:runCheckstyle'

After Implementing Huawei Ads Into My App I Am Facing The Following Error Execution failed for task ':app:runCheckstyle'. Checkstyle rule violations were found. See the report at:...

Must strange site visitor user agent be avoided? If yes how?

I am using shared hosting. My site was showing "ERR_CONNECTION_REFUSED". So i went to see visitors to my (SSL) site. I found that instead of regular names in the "User Agent" list, cpanel visitors...

Inverting an Order-Preserving Minimal Perfect Hash Function in Better than O(K*lg N) Running Time

I am trying to find a more efficient solution to a combinatorics problem than the solution I have already found. Suppose I have a set of N objects (indexed 0..N-1) and wish to consider each subset...

Efficiently shift-or large bit vector

I have large in-memory array as some pointer uint64_t * arr (plus size), which represents plain bits. I need to very efficiently (most performant/fast) shift these bits to the right by some amount...