Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [performance]

Questions about the execution speed and memory usage of algorithms, data structures, languages and libraries.

1
vote
1answer
33 views

Radiation heat transfer between surfaces

I'm trying to model the temperature distribution over a curved surface. Apart from the heat equation, I need to take into account the energy emission/absorption through electromagnetic radiation. The ...
5
votes
2answers
100 views

Fast and Numerically Stable Pairwise Distance Algorithms

I'm looking for resources on fast, numerically stable pairwise euclidean distance algorithms. In particular, suppose $A \in \mathbb{R}^{M \times D}$ and $B \in \mathbb{R}^{N \times D}$ are two sets of ...
7
votes
2answers
116 views

Integer operations vs floating point operations

I have been working with an algorithm, which uses additions of floating point vectors, (sparse matrix of floats)x(dense vector of floats) dot products I recently found out that I can get the same ...
1
vote
0answers
34 views

MKL/FFTW performance of batch 1-D FFTs

MKL and FFTW offer 1-D FFTs that can operate on many inputs simultaneously - in other words, they can batch-transform the columns of some input matrix. Is the performance of these multi-transforms ...
2
votes
1answer
93 views

What is the fastest way to solve Ax=b (subject to constraints and an absolute term)

I am trying to solve/optimize $Ax=b$ in the least squares sense subject to box constraints; a few (less than 5) equality/inequality constraints; and an absolute function penalty (or some other ...
0
votes
1answer
127 views

CPU and GPU influence on task parallel execution performance

This question is mainly about hardware, but also about software. In my current work I have approximately 68 millions of combinations that I am iterating through, in parallel. For each of those ...
1
vote
1answer
416 views

General understanding of Intel MKL, threads and MPI

Preface I seem to lack a fundamental understanding of best practise recommendations given by Intels MKL user guides for using MKL in threaded applications. So let's clarify it together. Wording and ...
1
vote
0answers
151 views

Potential gain - Matlab vs C/C++ - assembly and eigenvalues

I have a Matlab code computing the solution to an eigenvalue PDE. It consists of two parts: assembly of the stiffness/rigidity matrices and solving a generalized eigenvalue problem. I mention that the ...
1
vote
1answer
252 views

Kronecker product among multiple arrays

I was wondering whether there is a smart and efficient way in Matlab to compute the kronecker product of several 1D arrays. What I mean is something like this ...
1
vote
2answers
131 views

Sign of integer determinant 4 by 4

I'm in the context of this publication: http://www.gilbertbernstein.com/resources/booleans2009.pdf I applied quantization to my point coordinates: All coordinates are integer lying in [0, 2 power 20]....
3
votes
1answer
878 views

Loop optimization with f2py, Cython and Numba

I tried to used f2py, Cython and Numba to make a simple loop structure be faster in python. Python implementation: ...
1
vote
1answer
79 views

Efficiency of Array Slicing

I have large arrays of data organized so that it can be processed efficiently using array processing libraries. However, there are times when I only need to process slices of the arrays where a slice ...
1
vote
0answers
217 views

Vectorizing Matrix Multiplication

I would like to do the following operation: I have a "4D" matrix A and a "3D" matrix B. Both A and B are actually 2D matrices, where for A, each element is a 2D matrix, and for B, each element is a 1D ...
0
votes
1answer
152 views

Find hidden sequence $a_n = a_{n-1} + T $ , with period $T$, given some “random” numbers

I have this data plotted on a graph in which all points have the same value on the y-axis, e.g a constant integer "c", while the x-axis is the time in seconds. So, for a c = 25 on the y-axis, there ...
4
votes
1answer
240 views

Why is the speed of the parts of the LU-decomposition so different?

I know that an easy way to solve the matrix problem $$A\cdot x=b$$ is the LU decomposition $$\begin{split} L,\,U&=\text{lu}(A)\\ y&=\text{solve}(L,\,b)\\ x&=\text{solve}(U,\,y) \end{split}$...
0
votes
1answer
60 views

Speeding up group apply in python

In my code it often happens that I need to calculate values for a group. For example, suppose there is the following data: ...
4
votes
0answers
202 views

MATLAB: solving multiple ODE systems in parallel

I have a system of parameterized ODEs that I would like to solve using MATLAB and its ode45 solver, and was wondering if it is possible to perform such a task in ...
1
vote
1answer
97 views

Efficiently determine whether a curve intersects a given rectangle?

Suppose we have a straight line in Cartesian space such that $$ x_k = x_0 + k \delta x, \quad \quad y_k = y_0 + k \delta y, \quad \quad z_k = z_0 + k \delta z $$ where $k$ can take any real value. If ...
1
vote
1answer
78 views

Declare variable to substitute one calculate only once

Frame of the question I am currently editing an add-on module to an ocean/circulation model, which is written in Fortran. The code of the main model is quite optimized with respect to short run time (...
3
votes
0answers
87 views

Finite difference method for coupled PDEs: optimizing performance (time step, iterations per step)

I'm solving coupled PDEs using finite difference method: Incompressible Navier-Stokes and the divergence-free induction equation (Maxwell's equations) with non-uniform electrical conductivity. The ...
4
votes
3answers
2k views

Beating typical BLAS libraries matrix multiplication performance

A dull matrix multiplication algorithm where we use the formula $$C_{ij}=\sum_{k}A_{ik}B_{kj}$$ By literally following this in 3 loops we'll get a very slow program, because we don't utilize ...
2
votes
2answers
740 views

CPU for ab-initio DFT calculations

I need to build a new desktop PC, where ab-initio DFT calculation going to be performed. I am searching for a CPU in value range 600 - 1000€. I was thinking about six-core Intel Core i7-6850K or 8-...
3
votes
2answers
7k views

The real myth of GPU (specifically CUDA) really speed up FEM/CFD

Now I have been believing that FEM/CFD is supposed to be faster on a GPU unit - here I am using CUDA as solid example. However, I have not been able to find a convincing paper where the benchmark ...
2
votes
2answers
104 views

RAMdisks and finite element calculations

I heard about Ramdisks some years ago and even set up one for testing on mymachine. I didn't test it thoroughly so I couldn't really judge the performance improvements (in comparison to plain a SSD). ...
1
vote
2answers
1k views

What makes a computer fast and powerful to run numerical simulations?

I need to compare two computers and decide which one I want. My goal is to run faster simulations. The current run time is 3.5 hours and I would like to reduce that as much as possible. The code I am ...
0
votes
2answers
143 views

Fast Python implementation of short-range interacting particles under Metroplis algorithm

Can anyone write a Python implementation of a set of particles interacting in 2D according to a short-range particle-particle force and evolving in time under a Metropolis algorithm, which randomly ...
9
votes
2answers
231 views

How much does choice of OS matter for performance of scientific computing code?

It's common parlance to say that Linux is faster, and for good reasons. But as stated in the title, how much does choice of OS matter for performance of scientific computing code? For something things ...
4
votes
0answers
350 views

Sparse matrix format and sparse-matrix sparse-matrix multiplication

Good morning, I'm having some performance problems with my code dealing with the multiplication of big sparse matrices (stiffness and aerodynamic influence coefficient matrices). Mainly I have to ...
8
votes
1answer
637 views

Integer vs float multiplication performance, modern CPUs

Are there benchmarks for how many multiplications of various integer types compared to floating point types can be achieved per second on modern CPUs? I'm trying to get some hint if it would be ...
3
votes
1answer
1k views

Why am I not seeing faster neural network training after upgrading to a vastly better GPU?

I was previously running my neural networks using the Lasagne library to build and train neural networks in Theano on an NVIDIA GTX 750 Ti. I'm using a genetic algorithm to tune the hyperparameters of ...
0
votes
1answer
691 views

How to decide how to parallelize nested loops on GPU

Suppose I have an algorithms which I want to implement ona GPU. The algorithm consists of a main loop, and all iterations of the loop can be run in parallel. Also, each iteration of the loop has an ...
2
votes
2answers
90 views

Branch avoidance for performance with modern compilers?

Hello I hope I'm asking this in the right community, please feel free to redirect me some better place if you don't think it fits here. As I learned when I went to university half an eternity ago, ...
8
votes
1answer
744 views

What is the state of the art algorithm for diagonalizing real symmetric matrices?

There are many methods for diagonalizing matrices, probably the most widely used is the combination of Householder transformations and the QR algorithm. Is there any superior method for diagonalizing ...
6
votes
1answer
156 views

How to compare runtimes of two algorithms in a reproducible way

I am solving one relatively simple problem with two different algorithm: one which uses brute force while the other is optimized. For a variety of reasons I actually cannot show the codes here but I ...
5
votes
1answer
117 views

Pseudoinverse of perturbed matrix

How does the pseudo inverse of a full column rank matrix change if I rescale a single row? In more detail the problem is the following: We have a fixed matrix $V$ with linear independent columns and ...
2
votes
1answer
64 views

Is it common or to use objects for calculation of pair interactions in physics and chemistry simulations?

When simulation atoms, molecules, colloids, autc., are there programs that define each interacting unity as an object in the OOP sense? In my own case, I've been simulating magnetic nanoparticles in ...
6
votes
1answer
108 views

Finding all binary vectors with given A-length

I am given a $n \times n$ matrix $A$ with real entries and define the inner product $$\langle x,y\rangle = x^T A y.$$ I am also given an integer $k$ and need to find all binary vectors $x$ such that $...
8
votes
1answer
485 views

Hardware performance, floating point functions

First of all, hope I've found the right forum for this question, if I haven't please pass me on to a one which would fit better. Out of curiosity from an argument with someone who may or may not be ...
1
vote
1answer
47 views

What are the computational solutions for periodic visualization of simulation?

I like to set my scientific simulation programs to generate a picture after a certain number of iterations, such that I can follow what is happening and maybe cancel the simulation before the ...
2
votes
1answer
123 views

Parallel efficiency

I would like to calculate efficiency of parallel alghoritm, using the number of computations instead of time computations. In materials from my studies I have a formula like below: $$ \eta(n,p) = \...
3
votes
2answers
175 views

Optimized parallel routine for $X' W X$ with $W$ diagonal

$X$ is a dense matrix of real doubles, typically of size 20 million rows and 500 columns, and $W$ is a diagonal matrix of real, non-negative doubles stored as a vector. I'm working in C and have ...
3
votes
1answer
527 views

Simple Runge-Kutta Scheme for nonlinear PDE

I am new to this community as well as to scientific programming. I programmed a simple 4th order Runge-Kutta for the 1-D Cahn-Hilliard Equation for some first simple calculations on pattern forming ...
0
votes
1answer
464 views

Power series regression linear fit in VBA excel

I wrote a program that calculates the best fit in VBA excel for the following model $$ y_k=c_1x_k+c_0+c_{-1}(x_k)^{-1} $$ solving for the best fit parameters $c_1$, $c_0$, and $c_{-1}$. However I ...
4
votes
2answers
116 views

Can other running processes harm the performance of my simulation?

I don't have an high-end machine on which run my simulation (Python + C extensions, based on numpy for calculations) Thus I intend to run the program on my PC, for several hours. I won't use the ...
7
votes
3answers
2k views

What is the fastest opensource implementation of Bessel functions computation?

I'm looking for an open-source (to use and learn from) software which computes Bessel functions of integer order of real argument to double precision the fastest among all such implementations. ...
1
vote
1answer
133 views

Choosing hardware to use with PETSc

I would like to know more on choosing hardware to get the maximum price/performance when using the PETSc library (and various third-party preconditionners) I am currently working on a 2 cpu (2*E5-...
19
votes
1answer
12k views

What is the preferred and efficient approach for interpolating multidimensional data?

What is the preferred and efficient approach for interpolating multidimensional data? Things I'm worried about: performance and memory for construction, single/batch evaluation handling dimensions ...
4
votes
1answer
98 views

How to evaluate a series of derivatives?

Consider the function $$f(\mathbf{x}) = \sum_{n=0}^{N} a_n \left( (\mathbf{b}-\mathbf{x})\cdot \nabla \right)^n \frac{1}{r}$$ where $r = |\mathbf{x}| = \sqrt{(x-x_0)^2 + (y-y_0)^2}$ and $a_n$ and $\...
1
vote
0answers
234 views

Speeding up the classical Jacobi method using Scheduled Relaxation method? [closed]

There has been quite a flutter recently in the iterative world about an algorithm that speeds up the classical Jacobi method by as much as 200 times using a scheduled relaxation method where a ...
2
votes
2answers
122 views

Expected computational time for DNS computation of fluid flow

Using an established criterion involving capturing eddies down to the Kolmogorov length scale it can be reasoned that the order of grid points in the computational mesh needs to be $N^3 \ge Re^{9/4}$ ...