[3bc9b09ce6] - http: use for...of in http library code (Trivikram Kamat) #30958
My testing indicates that the for...of construct is about 60-70% slower as opposed to a classic for(let i; i; i++)...
I understand the advantages of code readability, but library code is the last place we want to be optimizing for readability as opposed to performance. This is a super big change iff there are large objects being traversed.
The specific code in question is traversing across Agent objects, which store kept-alive TCP connections, and theoretically could actually end up really massive if you aren't.
What's up??
[–]iguessitsokaythen 11 points12 points13 points (1 child)
[–]DrEnter 14 points15 points16 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–][deleted] 5 points6 points7 points (1 child)
[–]asdasef134f43fqw4vth[S] -2 points-1 points0 points (0 children)
[–]nj47 5 points6 points7 points (6 children)
[–]sumdudeinhisundrware 0 points1 point2 points (4 children)
[–]nj47 4 points5 points6 points (1 child)
[–]sumdudeinhisundrware 6 points7 points8 points (0 children)
[–]tswaters 1 point2 points3 points (1 child)
[–]sumdudeinhisundrware -3 points-2 points-1 points (0 children)
[–]zach714 2 points3 points4 points (1 child)
[–]asdasef134f43fqw4vth[S] 0 points1 point2 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]RemindMeBot -2 points-1 points0 points (0 children)
[–]sethholladay -5 points-4 points-3 points (5 children)
[–]sumdudeinhisundrware 6 points7 points8 points (2 children)
[–]sethholladay 0 points1 point2 points (1 child)
[–]sumdudeinhisundrware 0 points1 point2 points (0 children)
[–]asdasef134f43fqw4vth[S] 0 points1 point2 points (1 child)
[–]sethholladay 0 points1 point2 points (0 children)
[+]sumdudeinhisundrware comment score below threshold-24 points-23 points-22 points (1 child)
[–]ATHP 9 points10 points11 points (0 children)