Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removing the last traces of Monitor from Agent. I guess we didn't nee…
…d re-entrant mutexes after all.
- Loading branch information
Nathan Sutton
committed
Mar 21, 2012
1 parent
ee27c7b
commit a5ee664
Showing
3 changed files
with
10 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
require "thread" | ||
require "monitor" | ||
|
||
require "agent/version" | ||
require "agent/errors" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a5ee664
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's crazy how much slower Monitors are than Mutexes, especially on ruby 1.8. The sieve benchmark takes 79.7s in ruby 1.8 w/ Monitors. The same benchmark takes 32.5s with Mutexes. In ruby 1.9.2 it goes from 10.5s to 9.0s. A big improvement, imho.
a5ee664
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, well that's good to know. Now I'm curious to see where else Monitors are used.. and could benefit from this observation.