develooper Front page | perl.perl6.internals | Postings from January 2001

Re: perl IS an event loop (was Re: Speaking of signals...)

Thread Previous | Thread Next
From:
Uri Guttman
Date:
January 6, 2001 10:02
Subject:
Re: perl IS an event loop (was Re: Speaking of signals...)
Message ID:
200101061802.NAA01279@home.sysarch.com.
>>>>> "DS" == Dan Sugalski <dan@sidhe.org> writes:

  DS> At 11:49 AM 1/6/01 +0000, Simon Cozens wrote:
  >> On Fri, Jan 05, 2001 at 11:42:32PM -0500, Uri Guttman wrote:
  >> >   SC> 5x slowdown.
  >> >
  >> > not if you just check a flag in the main loop. you only check the event
  >> > system if you have pending events or signals, etc. the key is not
  >> > checking all events on each pass thru the loop.
  >> 
  >> Which is exactly what Chip did in his safe-signals patch. 33% slowdown.

  DS> I think you misremember that number. IIRC it was somewhere between
  DS> 3%-5%.  Heck, I barely managed a 33% slowdown forcing all variable
  DS> access to aquire a per-variable mutex. (A recursive one, no
  DS> less...)

that is what i would expect form a simple flag test and every N tests
doing a full event poll. and even up to 5-10% slowdown i would think is
a good tradeoff for the flexibilty and ease of design win we get in the
i/o and event guts. but then, i have always traded off speed for
flexibility and ease. hey, so has perl! :)

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About