forked from eriknw/benchtoolz
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Similar to #6, but has a different set of challenges. To summarize, I would like to be able to provide values to use for benchmarks via keyword arguments:
def bench(data=[0, 10, 10000]):
zeros(data)When displaying output, benchtoolz should be intelligent enough to use the name of the input if it is given, such as:
data_empty = 0
data_small = 10
data_large = 10000
def bench(data=[data_empty, data_small, data_large]):
zeros(data)Another way to label input may be to allow a dictionary to be given:
def bench(data={'empty': 0, 'small': 10, 'large': 10000}):
zeros(data)I don't know if a dictionary should be supported, because best practice will be to use keyword arguments for simple data, such as someflag=[True, False].
Another variant (pitfall?) to be aware of is if values are pre-initialized in a list, such as:
bench_data = [0, 10, 1000]
def bench(data=bench_data):
zeros(data)Metadata
Metadata
Assignees
Labels
No labels