Replies: 1 comment
-
maybe worth having a sort function in the SDK. if you want to implement one. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I recently did some serious stress tests on the duck script language, embedded in an application I'm working on.
I may be missing something, but I implemented a standard bubble sort and swap sort in a test script. My results were somewhat surprising.
Test:
Given a text file, containing a pair of numbers on each line (1000 lines) in the following format "1244 5432", parse the text into two unsorted arrays (left and right), then sort each array.
Result:
Bubble Sort... 22s
Left - Sorted in 11s
Right - Sorted in 11s
Swap Sort... 12s 30ms
Left - Sorted in 12s
Right - Fn returned after 30ms, returned array unsorted
I didn't think this language would be incredibly performant, but these results were surprising. The manual sort code was pretty lengthy given that there isn't any sort functions in sdk. Can share if it would help.
Beta Was this translation helpful? Give feedback.
All reactions