Dear amazon, I'm an angry consumer by your spam for amazon premium
xcombelle.github.io2 pointsby xcombelle0 comments
minimum = +Inf
for b in bar.naz():
if not some_filter(b):
continue
b = some_op(b)
minimum = min(minimum, b)
foo(minimum)
Yes, plain old procedural python. data flow from top to bottom.
it allows `print` debugging, very usefull to debug some_filter and some_op are broken. >>> import sys; sys.version
'3.10.4 (main, Dec 2 2022, 17:52:13) [Clang 14.0.0 (clang-1400.0.29.202)]'
51.94417405128479
37.79175686836243
100.8145821094513
2- global variable lookup is costly in python, putting the whole thing in a main() function halves the running time 22.97948908805847
22.47922682762146
59.1025867462158
link to my code: