bugMIT/GNU Scheme - Bugs: bug #27976, CWCC is ridiculously slow

 
 

bug #27976: CWCC is ridiculously slow

Submitted by:  Taylor R. Campbell <riastradh>
Submitted on:  Mon 09 Nov 2009 02:16:26 AM UTC  
 
Category: microcodeSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Suboptimal behavior
Status: NonePrivacy: Public
Assigned to: NoneOriginator Name: 
Open/Closed: Open
Keywords: 

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

 Spam posted by an anonymous
Mon 09 Nov 2009 02:16:26 AM UTC, original submission:

Although we use basically the same strategy for CWCC as Scheme48 uses (to reify, copy the stack into the heap, empty the stack, and push a return address of code that refills the stack; to reflect, replace the stack by the reified copy in the heap), MIT Scheme runs ctak twenty times slower (!) than Scheme48. This causes performance problems in programs that make heavy use of control abstractions, such as inverting the control of FOR-EACH-type procedures to yield first-class cursors.

I'm not sure what part of CWCC takes so much time. My two hypotheses are the state space transition algorithm (which I don't understand, and which is very different from Scheme48's seemingly much simpler algorithm), and switching back and forth between compiled code and the interpreter. Empirically, I can see that the run-time system's wrapping around the primitive (and thus perhaps the state space transition algorithm) occupies about two thirds of the time, since using the CWCC primitive reduces the time in ctak by that much. But that leaves Scheme48's CWCC (run-time system wrapping with state space transitions at all) still six to seven times faster than MIT Scheme's primitive CWCC.

Taylor R. Campbell <riastradh>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by riastradh (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup