Ruby, Blocks, CPS and call/cc

Don Box's Spoutlet

Syndication

It's been a weekend of Ruby at Chez Box (ok, actually it's been a weekend of pollen and allergy meds but that's another story).
 
What I'm wondering about this evening is about how various mechanisms get used in the wild and how the ruby runtime handles them.
 
Here's what I wish I knew:
 
  1. What's the performance penalty for passing/calling a block vs. executing the code "directly" on the current frame?  Does the cost go up/down if the block doesn't reference any symbols in the enclosing frame?  I know the answers for the CLR and C#, but I'm not sure my intuitions from that environment apply here.
  2. Do people wind up using blocks to model simple CPS-like idioms and if so, how does the runtime's stack management hold up?
  3. Are there lots of uses of Kernel.callcc in the wild, or is it a niche feature? How's the implementation on various OSs? How does the runtime deal with extern "C" calls that may be on the stack?
 
 

Posted May 08 2006, 04:16 AM by don-box

Comments

Don Box's Spoutlet wrote Block Perf Questions Redux
on 05-09-2006 2:29 AM
Sam Gentile wrote New and Notable 96
on 05-17-2006 10:35 AM
Again another month and change since the last one so this issue will be a collection of everything marked...
on 11-28-2006 4:07 AM
Don Box ???? ??? ?? ???? ??? ?? Ruby , ??? ????? ???? ?? ????????? ?? ???? ???????. ?????? ?????? ???
dbox wrote Ruby,Block,CPS 和 call/cc
on 12-18-2006 8:17 PM
??????????,??????????????????,Ruby???????????

Add a Comment

(required)  
(optional)
(required)  
Remember Me?