Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2017-07

A question about CASE OF

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Ched

Hello All,

Just... one question.

Are the items in the CASE OF statement tested linearly until one test reveals true (or if none, execute the else condition if any) or there is some mechanism of localization like in a sorted binary tree. Linearly: the item with a high probability are to be specified in first places. By tree, much faster for nearly same-probability items.

Can the compiler manage the tree version or have I to hardcode a tree of cascaded IF THEN ELSE ? If so, how much levels can I develop in this cascade ?

Cheers, Ched'

Reply by email