Top "Optimization" questions

Optimization is the act of improving a method or design.

How to write a large buffer into a binary file in C++, fast?

I'm trying to write huge amounts of data onto my SSD(solid state drive). And by huge amounts I mean 80…

c++ performance optimization file-io io
A weighted version of random.choice

I needed to write a weighted version of random.choice (each element in the list has a different probability for …

python optimization
Measuring execution time of a function in C++

I want to find out how much time a certain function takes in my C++ program to execute on Linux. …

c++ optimization profiling
Rounding up to next power of 2

I want to write a function that returns the nearest next power of 2 number. For example if my input is 789, …

c optimization bit-manipulation
Fastest way to remove non-numeric characters from a VARCHAR in SQL Server

I'm writing an import utility that is using phone numbers as a unique key within the import. I need to …

sql sql-server performance optimization
Inline functions in C#?

How do you do "inline functions" in C#? I don't think I understand the concept. Are they like anonymous methods? …

c# optimization inline
How to split/partition a dataset into training and test datasets for, e.g., cross validation?

What is a good way to split a NumPy array randomly into training and testing/validation dataset? Something similar to …

python arrays optimization numpy
Combine and Minify Multiple CSS / JS Files

I am trying to optimize a site performance by consolidating and compressing the CSS and JS files. My question is …

javascript css optimization yui-compressor http-compression
How to identify unused CSS definitions from multiple CSS files in a project

A bunch of CSS files were pulled in and now I'm trying to clean things up a bit. How can …

css performance optimization code-cleanup
Storing JSON in database vs. having a new column for each key

I am implementing the following model for storing user related data in my table - I have 2 columns - uid (…

mysql sql sql-server database optimization