Feature #1927

Core: inter-particle: InterferenceFunction2DParaCrystal::interference1D is slow

Added by pospelov almost 3 years ago. Updated 5 days ago.

Status:BacklogStart date:18 Dec 2017
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

Reasoning:
Simulation using interference function of 2D para crystal is quite popular among users, however the performance is quite poor.

For the moment 90% of execution time of standard GUI example "Interference function of 2D para crystal" is spend inside
InterferenceFunction2DParaCrystal::interference1D method.

The most of the time where is inside

line 237: tmp = std::pow(fp, n);

Attempt #1:
Replacing tmp with tmp=0.0 makes simulation 5 times faster (but of course all para2D related functional tests fails with significant difference).

Attempt #2:
Replacement of std::pow(fp, n) with std::exp(n*std::log(fp)) only makes simulation 50% slower.

History

#1 Updated by wuttke 6 days ago

  • Subject changed from Investigate performance of InterferenceFunction2DParaCrystal::interference1D method to Core math: InterferenceFunction2DParaCrystal::interference1D is slow
  • Status changed from New to Backlog
  • Priority changed from Low to Normal

#2 Updated by wuttke 5 days ago

  • Subject changed from Core math: InterferenceFunction2DParaCrystal::interference1D is slow to Core: inter-particle: InterferenceFunction2DParaCrystal::interference1D is slow

Also available in: Atom PDF