Project

General

Profile

ActionsLike0

Bug #7968

open

Poor UDPSocket#send performance in ruby 2.0.0 on windows

Added by cs96and (Alan Davies) about 12 years ago. Updated over 1 year ago.

Status:
Assigned
Assignee:
Target version:
-
ruby -v:
ruby 2.0.0p0 (2013-02-24) [x64-mingw32]
Backport:
[ruby-core:52936]
Tags:

Description

I have noticed that the performance of UDPSocket#send on ruby 2.0.0 on windows is much poorer than that of 1.9.3 or 1.8.7. Running the attahced script on 2.0.0 gives the following...

d:\scripts>bash -c "ruby --version"
ruby 2.0.0p0 (2013-02-24) [x64-mingw32]

d:\scripts>bash -c "time ruby socketsendtest.rb"

real 0m2.572s
user 0m0.000s
sys 0m0.016s

However, running the same test with 1.9.3 is much faster...

d:\scripts>pik 193

d:\scripts>bash -c "ruby --version"
ruby 1.9.3p374 (2013-01-15) [i386-mingw32]

d:\scripts>bash -c "time ruby socketsendtest.rb"

real 0m0.993s
user 0m0.015s
sys 0m0.016s

Additionally, if I change the send call to a print (commented out in the script), then the performance is fine on 2.0.0....

d:\scripts>pik 200

d:\scripts>bash -c "ruby --version"
ruby 2.0.0p0 (2013-02-24) [x64-mingw32]

d:\scripts>bash -c "time ruby socketsendtest.rb"

real 0m0.907s
user 0m0.000s
sys 0m0.015s

What is send() doing that print() doesn't do that is causing the massive performance drop?

Thanks
Alan.


Files

socketsendtest.rb (266 Bytes) socketsendtest.rb Script to test UDPSocket#send cs96and (Alan Davies), 02/26/2013 08:55 PM
#1

Updated by drbrain (Eric Hodel) about 12 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Updated by nagachika (Tomoyuki Chikanaga) about 12 years ago

  • % Done changed from 100 to 0
  • Status changed from Closed to Open

Updated by luislavena (Luis Lavena) almost 12 years ago

  • Status changed from Open to Assigned
  • Assignee changed from windows to usa (Usaku NAKAMURA)

Updated by usa (Usaku NAKAMURA) over 7 years ago

  • Assignee changed from usa (Usaku NAKAMURA) to windows
ActionsLike0

Also available in: Atom PDF