Skip to content

Commit 192827c

Browse files
committed
added performance tests showing around 3x outperformance
1 parent 02cb20a commit 192827c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

performance/__main__.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
from performance.reference.util import get_new_indexers_and_screen_ref
2828
from performance.reference.util import split_after_count as split_after_count_ref
2929
from performance.reference.util import count_iteration as count_iteration_ref
30+
from performance.reference.util import slice_to_ascending_slice as slice_to_ascending_slice_ref
3031

3132
from performance.reference.array_go import ArrayGO as ArrayGOREF
3233

@@ -45,6 +46,7 @@
4546
from arraykit import isna_element as isna_element_ak
4647
from arraykit import split_after_count as split_after_count_ak
4748
from arraykit import count_iteration as count_iteration_ak
49+
from arraykit import slice_to_ascending_slice as slice_to_ascending_slice_ak
4850

4951
from arraykit import ArrayGO as ArrayGOAK
5052

@@ -735,6 +737,22 @@ class CountIterationsREF(CountIterations):
735737
entry = staticmethod(count_iteration_ref)
736738

737739

740+
#-------------------------------------------------------------------------------
741+
class SliceToAscending(Perf):
742+
NUMBER = 1_000_000
743+
744+
def __init__(self):
745+
self.slc = slice(100, 1, -3)
746+
747+
def main(self):
748+
_ = self.entry(self.slc, 101)
749+
750+
class SliceToAscendingAK(SliceToAscending):
751+
entry = staticmethod(slice_to_ascending_slice_ak)
752+
753+
class SliceToAscendingREF(SliceToAscending):
754+
entry = staticmethod(slice_to_ascending_slice_ref)
755+
738756
#-------------------------------------------------------------------------------
739757

740758
def get_arg_parser():

0 commit comments

Comments
 (0)