mgastner / cartogram-cpp

Cartogram generator in C++
MIT License
8 stars 4 forks source link

Can FFTW array allocation be done only once per inset? Can the FFTW plan be recycled? #138

Closed mgastner closed 4 days ago

mgastner commented 2 years ago

Unfortunately, flatten_density() is quite slow. I am wondering whether some speed could be gained by allocating memory for grid_flux*_init before the first iteration of flatten_density() and then be kept alive until the integration is finished for this inset. At the same points in the code, the plans could perhaps be created and destroyed only once per inset.