ExploreTrendingAnalytics
Nostr Archives
ExploreTrendingAnalytics
PlanB1040d ago
@5c10ed06…99cb53e2 can you please make this Python code faster (data file d.txt is ~350GB and the code processes ~2 billion dictionary inserts and ~2 billion pops)? d={} with open('d.txt','r') as f: for l in f: v=l.split(" ") b,i,o=int(v[0]),int(v[1]),int(v[2]) for x in range(4+i,4+i+o): d[str(v[x+o])]=(b,float(v[x])) for x in range(4,4+i): d.pop(str(v[x]), None) print(d)
💬 1 replies

Replies (1)

PlanB1040d ago
Thank you @5c10ed06…99cb53e2 but can you make the improved code for me?
0000 sats