-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from Standard.Base import all | ||
|
||
import Standard.Test.Bench | ||
|
||
import Standard.Test.Faker | ||
import Standard.Base.Data.Ordering.Natural_Order | ||
|
||
## Bench Utilities ============================================================ | ||
|
||
vector_size = 10000 | ||
iter_size = 100 | ||
num_iterations = 10 | ||
|
||
|
||
# The Benchmarks ============================================================== | ||
|
||
main = | ||
l = Faker.upper_case_letters | ||
n = Faker.numbers | ||
template = [l, l, l, n, n, n, n, n, l] | ||
random_generator = Faker.make_generator 1644575867 | ||
unsorted = 0.up_to here.vector_size . map _->(Faker.make_string template random_generator) | ||
|
||
Bench.measure (unsorted.sort by=Natural_Order.compare) "Natural Order" here.iter_size here.num_iterations |