Quantcast
Channel: How I fast up my code instead of using for loop? - Stack Overflow
Browsing index pages (4 articles)
↧

How I fast up my code instead of using for loop?

Here I have two datasets "Y_N" and "data". "Y_N" have 8 thousand record and in "data" have 1.6 million records. in both dataset each record in the form of string. so my task is to match each record of...

View Article


Answer by LearnTechWithFun for How I fast up my code instead of using for loop?

You have to iterate I’ve the data so you will be needing the for loop, but to increase the performance you can divide the load and assign the parts to different threads simultaneously or if you don’t...

View Article


Answer by Jan Wilamowski for How I fast up my code instead of using for loop?

The limiting factor seems to be the fuzz.ratio() function in the library you use, as it doesn't support vectorization. You could try running the calculation in parallel batches, using the...

View Article

Answer by maxbachmann for How I fast up my code instead of using for loop?

I would recommend the usage of RapidFuzz (I am the author) instead of fuzzywuzzy, which is significantly faster. You can replace your for loop with the following implementation:import numpy as npfrom...

View Article
Browsing index pages (4 articles)


Latest Images