forked from schacon/perl
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor loops in S_hsplit(), Perl_hv_ksplit() and Perl_ptr_table_spl…
…it(). Change from for() to do ... while() loops. Move variable initialisation to variable declaration. Avoid needing to use the comma operator to allow multiple statements in for(). Avoid using a continue statement where it isn't actually needed to change flow control. Avoid relying on the optimiser to know that the for loop conditional doesn't need testing on the first pass. A current gcc's optimiser produces identical code despite these changes. However, for the reasons given I consider the code to be much clearer.
- Loading branch information
Showing
2 changed files
with
13 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters