You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At first, I thought the issue was with toolz.pipe. I reviewed its implementation and noticed it’s just a for loop. I then tried using the pipe functions from the expression and returns libraries, but both were still slow.
Next, I suspected the map function might be causing the slowdown. After further investigation, I discovered that the real issue was with toolz.curry, which was responsible for the drastic performance drop.
Simplified Test Case
To isolate the issue, I simplified my original script to the bare minimum for testing. Below is the test code:
Issue: Significant Performance Slowdown with
toolz.curry
I encountered a performance slowdown where
toolz.curry
made my script over 50x slower in some cases.Initially, I had the following code:
I was working with nearly 10 million records, and the process was extremely slow. After waiting for about 30 minutes, I had to stop the program.
After investigating, I found that modifying the code to the following version significantly improved performance:
At first, I thought the issue was with
toolz.pipe
. I reviewed its implementation and noticed it’s just afor
loop. I then tried using thepipe
functions from theexpression
andreturns
libraries, but both were still slow.Next, I suspected the
map
function might be causing the slowdown. After further investigation, I discovered that the real issue was withtoolz.curry
, which was responsible for the drastic performance drop.Simplified Test Case
To isolate the issue, I simplified my original script to the bare minimum for testing. Below is the test code:
Test Results
Additional Note
toolz.curried.map(fn, iter)
does not affect performance. The performance issue only occurs withtoolz.curried.map(fn)(iter)
.System Information
The text was updated successfully, but these errors were encountered: