You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was demonstrating "by hand" sorting, with a very simple-swap-algorithm, on a shuffled file of 25,000 long pathsaccounting 4,095,501 chars, got form my home dir listing.
The algorithm didn't end after 40 min when the string is split by lines with split(separator:) generating SubString's, while it complets in about 35 sec when string is split with components(separatedBy:) generating String's.
I made a test with the same simple-swap-algorithm on a randomly generated string of 10,000 lines being 1024 chars length. But I randomly generated string one with pretty simple ASCII like chars and one with decomposed chars (áàâéèíìñòôúùûÁÀÂÉÈÊíÌÓÒÔÚÙÛ).
The result seams to be the opposite of my first test
Attachment: Download
Environment
MacBook Pro (16- 2019)
2.4 GHz 8-Core Intel Core i9
32 GB 2667 MHz DDR4
Additional Detail from JIRA
md5: 98b9a9a5273cb0eb0467aa1c5952e983
Issue Description:
I was demonstrating "by hand" sorting, with a very simple-swap-algorithm, on a shuffled file of 25,000 long paths accounting 4,095,501 chars, got form my home dir listing.
The algorithm didn't end after 40 min when the string is split by lines with split(separator:) generating SubString's, while it complets in about 35 sec when string is split with components(separatedBy:) generating String's.
I made a test with the same simple-swap-algorithm on a randomly generated string of 10,000 lines being 1024 chars length. But I randomly generated string one with pretty simple ASCII like chars and one with decomposed chars (áàâéèíìñòôúùûÁÀÂÉÈÊíÌÓÒÔÚÙÛ).
The result seams to be the opposite of my first test
Simple string w\ components(separatedBy:) => avg. 4.73
Simple string w\ split(separator:) => avg. 41.8
Complexe string w\ components(separatedBy:) => avg. 3.05
Complexe string w\ split(separator:) => avg. 4.06
(attached my test files including dir listing)
The text was updated successfully, but these errors were encountered: