9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] plan9ports performance
@ 2004-05-25 17:13 a
  2004-05-25 17:56 ` boyd, rounin
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: a @ 2004-05-25 17:13 UTC (permalink / raw)
  To: 9fans

does this seem normal?

: unix; time sed -e 's/e/E/g' fortunes > /dev/null
0.01u 0.02s 0.03r        sed -e s/e/E/g fortunes
: unix; time 9sed -e 's/e/E/g' fortunes > /dev/null
0.17u 0.00s 0.17r        9sed -e s/e/E/g fortunes

the difference seems to get greater (percentage) with more
complicated scripts (although i don't have an example that
is more complicated without hitting unix/plan9 sed
differences).

is this just the inherent cost of adding another abstraction
layer, is there something in the plan 9 sed version, or is
something buggered on my system?
ア


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] plan9ports performance
  2004-05-25 17:13 [9fans] plan9ports performance a
@ 2004-05-25 17:56 ` boyd, rounin
  2004-05-25 18:14   ` Rob Pike
  2004-05-25 22:49 ` Russ Cox
       [not found] ` <ee9e417a040609065746ca3d4f@mail.gmail.com>
  2 siblings, 1 reply; 5+ messages in thread
From: boyd, rounin @ 2004-05-25 17:56 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> does this seem normal?

UTF-8/Runes?



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] plan9ports performance
  2004-05-25 17:56 ` boyd, rounin
@ 2004-05-25 18:14   ` Rob Pike
  0 siblings, 0 replies; 5+ messages in thread
From: Rob Pike @ 2004-05-25 18:14 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

the implementation of regexps in the plan 9 library is pretty pokey.
it's nice and short but it is not fast.

that said, the factor of 5 to look at a single character seems a little
high. not impossibly high, but high.

-rob


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] plan9ports performance
  2004-05-25 17:13 [9fans] plan9ports performance a
  2004-05-25 17:56 ` boyd, rounin
@ 2004-05-25 22:49 ` Russ Cox
       [not found] ` <ee9e417a040609065746ca3d4f@mail.gmail.com>
  2 siblings, 0 replies; 5+ messages in thread
From: Russ Cox @ 2004-05-25 22:49 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> : unix; time sed -e 's/e/E/g' fortunes > /dev/null
> 0.01u 0.02s 0.03r        sed -e s/e/E/g fortunes
> : unix; time 9sed -e 's/e/E/g' fortunes > /dev/null
> 0.17u 0.00s 0.17r        9sed -e s/e/E/g fortunes

you could rewrite things to avoid the need to
zero Resublists so much.  it's hard to get excited
about it.

t23=; profile 9sed s/e/E/g fortunes >/dev/null
 0.7%	/usr/local/plan9/bin/9sed:executable
 1.4%	/usr/local/plan9/bin/9sed:Bputc
 1.4%	/usr/local/plan9/bin/9sed:putline
 1.4%	/usr/local/plan9/bin/9sed:rregexec9
 2.0%	/usr/local/plan9/bin/9sed:Bputrune
 2.7%	/usr/local/plan9/bin/9sed:Bgetrune
 2.7%	/usr/local/plan9/bin/9sed:_renewmatch
 2.7%	/usr/local/plan9/bin/9sed:_rrenewemptythread
 2.7%	/usr/local/plan9/bin/9sed:gline
 6.8%	/usr/local/plan9/bin/9sed:Bgetc
11.5%	/usr/local/plan9/bin/9sed:dosub
14.2%	/usr/local/plan9/bin/9sed:_renewthread
18.2%	/usr/local/plan9/bin/9sed:rregexec1
31.8%	/lib/tls/libc-2.3.2.so:memset
t23=;

russ


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] plan9ports performance
       [not found] ` <ee9e417a040609065746ca3d4f@mail.gmail.com>
@ 2004-06-09 18:44   ` boyd, rounin
  0 siblings, 0 replies; 5+ messages in thread
From: boyd, rounin @ 2004-06-09 18:44 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> on the other hand, it could be worse.  look at gnu grep:

yeah, i'll bet all the time is spent in the arg processing code ;)



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-06-09 18:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-25 17:13 [9fans] plan9ports performance a
2004-05-25 17:56 ` boyd, rounin
2004-05-25 18:14   ` Rob Pike
2004-05-25 22:49 ` Russ Cox
     [not found] ` <ee9e417a040609065746ca3d4f@mail.gmail.com>
2004-06-09 18:44   ` boyd, rounin

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 NNTP newsgroup(s).