Python Forum
.remove() method in for-loop
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
.remove() method in for-loop
#7
(Oct-09-2018, 01:04 AM)ichabod801 Wrote: And you didn't test filter. If you add
Yes the filter one is fast.
Can also do a run PyPy,
It take a lot time down on the solution that not so optimal and not so much(as expected) on solution that is already good.
# Python 3.7
λ python test_bo.py
time_1 --> 53.79
time_2 --> 2.16
time_3 --> 1.03
time_4 --> 92.84
time_5 --> 0.20

# PyPy Python 3.5
λ pypy3 test_bo.py
time_1 --> 17.54
time_2 --> 0.76
time_3 --> 0.93
time_4 --> 21.62
time_5 --> 0.15
Reply


Messages In This Thread
.remove() method in for-loop - by nzcan - Oct-08-2018, 07:39 PM
RE: .remove() method in for-loop - by ichabod801 - Oct-08-2018, 08:25 PM
RE: .remove() method in for-loop - by TimeMen - Oct-08-2018, 08:30 PM
RE: .remove() method in for-loop - by ichabod801 - Oct-08-2018, 08:34 PM
RE: .remove() method in for-loop - by snippsat - Oct-08-2018, 10:23 PM
RE: .remove() method in for-loop - by ichabod801 - Oct-09-2018, 01:04 AM
RE: .remove() method in for-loop - by snippsat - Oct-09-2018, 02:07 PM
RE: .remove() method in for-loop - by gruntfutuk - Oct-13-2018, 07:05 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020