Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Shared vs non shared PMC timings
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Leopold Toetsch  
View profile  
 More options Jan 20 2004, 12:00 pm
Newsgroups: perl.perl6.internals
From: l...@toetsch.at (Leopold Toetsch)
Date: Tue, 20 Jan 2004 17:48:19 +0100
Local: Tues, Jan 20 2004 11:48 am
Subject: Shared vs non shared PMC timings
To estimate the costs of shared PMCs I have run this program[1], once
with .Ref and once with .SharedRef.

There are 2 major issues:
1) PMC initialization (new_p_ic_p): The shared PMC needs additionally
the allocation of the synchronize structure and the MUTEX_INIT.
2) PMC access (set_p_i): locking/unlocking the mutex

Here are snippets from the profile:

with SharedRef
  CODE  OP FULL NAME            CALLS  TOTAL TIME   AVG T. ms
  ----  -----------------     -------  ----------  ----------
   753  new_p_ic_p             100000    0.157785      0.0016
   905  set_p_i                100000    0.049269      0.0005

with Ref
  CODE  OP FULL NAME            CALLS  TOTAL TIME   AVG T. ms
  ----  -----------------     -------  ----------  ----------
   753  new_p_ic_p             100000    0.051330      0.0005
   905  set_p_i                100000    0.011356      0.0001

(Overall timings aren't really comparable, the SharedRef also does a
LOCK for mark, which slows that down as well)

Linux 2.2.16, Athlon 800, unoptimized Parrot build.
leo

[1]
      set I0, 100000
      set I1, 0
lp:
      new P0, .PerlInt
      new P1, .Ref, P0  # or .SharedRef
      set P1, I1
      inc I1
      lt I1, I0, lp
      end


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.