**Describe the situation**
https://markify.dev/p/zfrQMV2/text

**How to reproduce**
On aws `c5ad.24xlarge` run a query:

```
SET max_memory_usage = '100G', max_threads = 1000, max_insert_threads = 96

INSERT INTO wikistat WITH
    parseDateTimeBestEffort(extract(toLowCardinality(_path), 'pageviews-([\\d\\-]+)\\.gz$')) AS time,
    splitByChar(' ', line) AS values,
    splitByChar('.', values[1]) AS projects
SELECT
    time,
    projects[1] AS project,
    projects[2] AS subproject,
    values[2] AS path,
    CAST(values[3], 'UInt64') AS hits
FROM s3('https://....s3.eu-central-1.amazonaws.com/wikistat/original/*.gz', '...', '...', LineAsString, auto)
WHERE length(values) >= 3
```

Performance is not bad (22 million rows are inserted per second) but can be better.
uint16_t bit_mask = _mm_movemask_epi8(eq);
                    if (bit_mask)
                    {
                        next_pos += __builtin_ctz(bit_mask);
                        return;
                    }
                }
#endif
                while (next_pos < buf.buffer().end()
                    && *next_pos != delimiter && *next_pos != '\r' && *next_pos != '\n')
                    ++next_pos;
            }();
            appendToStringOrVector(s, buf, next_pos);
            buf.position() = next_pos;
            if (!buf.hasPendingData())
                continue;
            /** CSV format can contain insignificant spaces and tabs.
              * Usually the task of skipping them is for the calling code.
              * But in this case, it will be difficult to do this, so remove the trailing whitespace by ourself.
              */
            size_t size = s.size();
            while (size > 0
                && (s[size - 1] == ' ' || s[size - 1] == '\t'))
                --size;
            s.resize(size);
            return;
        }
    }
}
void readCSVString(String & s, ReadBuffer & buf, const FormatSettings::CSV & settings)