|
From: | Rik |
Subject: | [Octave-bug-tracker] [bug #60928] Performance of sort unexpectedly slow for DIM=2 |
Date: | Mon, 16 Aug 2021 14:53:36 -0400 (EDT) |
User-agent: | Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36 |
Update of bug #60928 (project octave): Status: Confirmed => Patch Submitted _______________________________________________________ Follow-up Comment #13: I replaced the while loop calculation of offset with a calculation using division and multiplication of integers. I believe the logic is correct. The old timings for my benchmark data were ## Baseline DIM1: 0.072642 DIM2: 2.146125 DIM3: 0.478395 DIM4: 0.137138 The new timings are ## patch applied DIM1: 0.055149 DIM2: 0.038490 DIM3: 0.037952 DIM4: 0.148342 Much better results, and I verified that the sorted data matches that done with the original algorithm. Interestingly, dimension 1 is now slightly slower than two or three. I think the cause lies outside of the Array<T>::sort routine. Marking as Patch Submitted. (file #51791) _______________________________________________________ Additional Item Attachment: File name: bug60928.cset Size:1 KB <https://file.savannah.gnu.org/file/bug60928.cset?file_id=51791> _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?60928> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |