My results are similar, with `-d:danger` included (which I hadn't tried 
before). Basically, the case-else version seems like the best of the bunch.

Now, here comes an even weirder realization...

If I add this to the mix a `.computedGoTo.` benchmark, the results baffle me 
even more:
    
    
    benchmark "case-all+computedGoTo+while":
        var item = A
        var i = 1
        while true:
            {.computedGoto.}
            case item:
                of A:
                    item = B
                of B:
                    item = C
                of C:
                    item = D
                of D:
                    item = E
                of E:
                    item = A
            i += 1
            if i > loops:
                break
    
    
    Run

This is clearly the fastest generally. BUT: when compiled with `-d:danger` it 
takes roughly double the time each and every one of the rest takes. 

Reply via email to