-
-
Save mGalarnyk/8c491fbdfe6ce3e498a7f62f03fa9ca4 to your computer and use it in GitHub Desktop.
import math | |
import numpy as np | |
from timebudget import timebudget | |
iterations_count = round(1e7) | |
def complex_operation(input_index): | |
print("Complex operation. Input index: {:2d}".format(input_index)) | |
[math.exp(i) * math.sinh(i) for i in [1] * iterations_count] | |
@timebudget | |
def run_complex_operations(operation, input): | |
for i in input: | |
operation(i) | |
input = range(10) | |
run_complex_operations(complex_operation, input) |
I have a better idea! Why don't you make another blog post with blocking or non blocking IO operations to have a more comprehensive set of benchmarks? I say this so that you can make your own opinion of each library and share that :)
Rather than adding to current blog, I will write another blog in the future with some more libraries as it definitely seems there are a ton of other libraries to include (joblib, dask, mpire to name a few) with a lot of different use cases, integrations, syntaxes (following each libraries best practices is important) and data sizes. Honestly, I really want to vary data sizes and see how well each library performs. Problem is making this sort of blog may take a bit of time to make, but should be fun :)
I am not realy sure of what operations would classify as blocking and non- io blocking ?
Oh dont worry about it then! It is not always easy to find that out unfortunately :(
Just suggesting you write. Every benchmark isn't perfect so I was suggesting you try your own :)
Yea , I will try and see if I get time :(
I have a better idea! Why don't you make another blog post with blocking or non blocking IO operations to have a more comprehensive set of benchmarks? I say this so that you can make your own opinion of each library and share that :)
Rather than adding to current blog, I will write another blog in the future with some more libraries as it definitely seems there are a ton of other libraries to include (joblib, dask, mpire to name a few) with a lot of different use cases, integrations, syntaxes (following each libraries best practices is important) and data sizes. Honestly, I really want to vary data sizes and see how well each library performs. Problem is making this sort of blog may take a bit of time to make, but should be fun :)