Skip to content

Commit 71c8fa2

Browse files
ntreldlang-bot
authored andcommitted
[spec/statement] Move note about case frequency up
1 parent bc3194a commit 71c8fa2

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

spec/statement.dd

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,6 +1319,14 @@ switch (i)
13191319
}
13201320
--------------
13211321

1322+
$(P $(B Implementation Note:) The compiler's code generator may
1323+
assume that the case
1324+
statements are sorted by frequency of use, with the most frequent
1325+
appearing first and the least frequent last. Although this is
1326+
irrelevant as far as program correctness is concerned, it is of
1327+
performance interest.
1328+
)
1329+
13221330
$(H3 $(LNAME2 case-range, Case Range Statement))
13231331

13241332
$(GRAMMAR
@@ -1424,13 +1432,6 @@ switch (name)
14241432
less error prone. `char`, `wchar` and `dchar` strings are allowed.
14251433
)
14261434

1427-
$(P $(B Implementation Note:) The compiler's code generator may
1428-
assume that the case
1429-
statements are sorted by frequency of use, with the most frequent
1430-
appearing first and the least frequent last. Although this is
1431-
irrelevant as far as program correctness is concerned, it is of
1432-
performance interest.
1433-
)
14341435

14351436
$(H2 $(LEGACY_LNAME2 FinalSwitchStatement, final-switch-statement, Final Switch Statement))
14361437

0 commit comments

Comments
 (0)