Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only perform a single sort when in local_spikevec_sort (#2453)
* Only perform a single sort when in local_spikevec_sort On a benchmark of 10000 (gid, time) pairs, with time varying from 0 to 10s, and gids from 0-9, I get roughly half the time: ------------------------------------------------------ Benchmark Time CPU Iterations ------------------------------------------------------ dual_sort 0.909 ms 0.909 ms 758 single_sort 0.546 ms 0.546 ms 1285 * fix the logic * fix comment * Use non-stable sort for local_spikevec_sort * confirmed that: nrnhines: "Since there are no equivalent (spiketime, gid) elements (and if there were, the order would not matter)" for a 10000 element array of synthetic data, the runtime is: ``` Benchmark Time CPU Iterations dual_sort 0.921 ms 0.921 ms 751 single_sort 0.533 ms 0.533 ms 1303 single_sort_unstable 0.480 ms 0.480 ms 1461 ```
- Loading branch information