[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

1Re: Yes, they are special, but...0



    Date: Mon, 19 Jun 89 19:34 EDT
    From: barmar@Think.COM (Barry Margolin)

    If the CASE statement you're talking about looks something like

	    (case <expression>
	      (0 ...)
	      (1 ...)
	      ...
	      (t ...))

    then the 3600 compiler will compile this into a computed go (I believe
    this was introduced in Genera 7.1 or 7.2).  It does this when all the
    keys are non-negative integers and the key space isn't too sparse (more
    than half of the keys from 0 to the largest key are used).  

Have you tried this on a machine with an IFU (including, I think, the G
machines)?  I was once told that the computed-goto generated for this
kind of code clears the instruction cache and actually makes the machine
perform worse than the equivalent COND, up to some apparently quite high
number of case dispatches.  I don't actually know if this is true, as I
haven't tested it and haven't seen the results of a test I believe.