jsoftware / jsource

J engine source mirror
Other
645 stars 91 forks source link

execution time anomaly when sorting long float vector #188

Open jip opened 3 months ago

jip commented 3 months ago
   JVERSION
Engine: j9.6.0-beta4/j64avx2/linux
Build: commercial/2024-03-19T00:51:21/clang-11-0-0/SLEEF=1
Library: 9.6.5
Platform: Linux 64
Installer: j9.6 install
InstallPath: /home/user/j9.6.0-beta4_j64avx2
Contact: www.jsoftware.com
   vf4=. 8 c. 9e4 ?@$ 10
   timespacex 'svf4=. /:~ vf4'
0.070542 1.04995e6
   vc4=. 16 c. 9e4 ?@$ 10
   timespacex 'svc4=. /:~ vc4'
0.007303 4.19578e6
   vf5=. 8 c. 9e5 ?@$ 10
   timespacex 'svf5=. /:~ vf5'
6.5743 8.38998e6
   vc5=. 16 c. 9e5 ?@$ 10
   timespacex 'svc5=. /:~ vc5'
0.082611 3.35559e7
   vf6=. 8 c. 9e6 ?@$ 10
   timespacex 'svf6=. /:~ vf6'
784.665 1.34219e8
   vc6=. 16 c. 9e6 ?@$ 10
   timespacex 'svc6=. /:~ vc6'
0.923717 5.36872e8

It can be seen that:

  1. an execution time is longer by factor ~10 for float datatype rather than for complex;
  2. an execution time grows as O(n^2) for float datatype and as O(n) for complex.

Additional info: CPU: Intel i7-4790, 3.60GHz Core: Haswell, 8 cores RAM: 16 Gb