yahns Ruby server user/dev discussion
 help / color / mirror / code / Atom feed
* [PATCH] reduce inline constant cache overheads
@ 2015-06-05 17:20 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2015-06-05 17:20 UTC (permalink / raw)
  To: yahns-public; +Cc: Eric Wong

We can use symbols in the SleepyPenguin APIs to trade speed for
space in uncommon code paths.
---
 lib/yahns/queue_epoll.rb  | 2 +-
 lib/yahns/sigevent_efd.rb | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/yahns/queue_epoll.rb b/lib/yahns/queue_epoll.rb
index 2875920..1511917 100644
--- a/lib/yahns/queue_epoll.rb
+++ b/lib/yahns/queue_epoll.rb
@@ -15,7 +15,7 @@ class Yahns::Queue < SleepyPenguin::Epoll::IO # :nodoc:
   QEV_WR = Epoll::OUT | Epoll::ONESHOT
 
   def self.new
-    super(SleepyPenguin::Epoll::CLOEXEC)
+    super(Epoll::CLOEXEC)
   end
 
   # for HTTP and HTTPS servers, we rely on the io writing to us, first
diff --git a/lib/yahns/sigevent_efd.rb b/lib/yahns/sigevent_efd.rb
index c65e13f..2c04b36 100644
--- a/lib/yahns/sigevent_efd.rb
+++ b/lib/yahns/sigevent_efd.rb
@@ -4,7 +4,7 @@
 class Yahns::Sigevent < SleepyPenguin::EventFD # :nodoc:
   include Kgio::DefaultWaiters
   def self.new
-    super(0, SleepyPenguin::EventFD::CLOEXEC)
+    super(0, :CLOEXEC)
   end
 
   def sev_signal
-- 
EW


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-06-05 17:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-05 17:20 [PATCH] reduce inline constant cache overheads Eric Wong

Code repositories for project(s) associated with this inbox:

	../../../yahns.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).