Skip to content

Instantly share code, notes, and snippets.

@mGalarnyk
Created September 1, 2021 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mGalarnyk/8c491fbdfe6ce3e498a7f62f03fa9ca4 to your computer and use it in GitHub Desktop.
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)
@mGalarnyk
Copy link
Author

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 :)

@Agrover112
Copy link

Yea , I will try and see if I get time :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment