Skip to content

Commit

Permalink
sv.c: Fix, clarify comment
Browse files Browse the repository at this point in the history
  • Loading branch information
khwilliamson committed Jul 8, 2023
1 parent bb1af65 commit d1f9e08
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sv.c
Expand Up @@ -7424,9 +7424,10 @@ S_sv_pos_u2b_midway(const U8 *const start, const U8 *send,
PERL_ARGS_ASSERT_SV_POS_U2B_MIDWAY;

if (uoffset < 2 * backw) {
/* The assumption is that going forwards is twice the speed of going
forward (that's where the 2 * backw comes from).
(The real figure of course depends on the UTF-8 data.) */
/* The assumption is that the average size of a character is 2 bytes,
* so going forwards is twice the speed of going backwards (that's
* where the 2 * backw comes from). (The real figure of course depends
* on the UTF-8 data.) */
const U8 *s = start;

while (s < send && uoffset--)
Expand Down

0 comments on commit d1f9e08

Please sign in to comment.