[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: primerd!DOUG@ENX.Prime.PDN
- Subject: Computed goto's
- From: David L. Andre <DLA@DIAMOND.S4CC.Symbolics.COM>
- Date: Mon, 30 Mar 87 19:00 EST
- Cc: email@example.com
- In-reply-to: <8703302250.AA09659@primerd.prime.com>
Date: 30 Mar 87 16:57:26 EST
Thinking about it there are times when one would like to do a computed goto.
I notice that (go tag) in tagbody is explicitly not calculated. For
maximum effect the computation should result directly in a dispatched
goto. One can get the effect of this by using lambda's in an array and
doing an array lookup but this is somewhat more expensive (?).
Any suggestions about this?
Why not use CASE on the dispatching integer? A good compiler could
always turn it into a dispatch instruction if the hardware supports it.