diff options
| author | Fabian Kosmale <fabian.kosmale@qt.io> | 2023-12-19 15:13:55 +0100 |
|---|---|---|
| committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2024-01-23 16:37:32 +0100 |
| commit | 04820be3011395bd5cb13dea8f81c9b9bca4da8f (patch) | |
| tree | 3df1086aabbe82e4146aad6552ccddab4d282038 /src/quick/doc/snippets | |
| parent | 65ffcb95500b77fd89f594b2db11cbc40d7b91bb (diff) | |
RegExp: Do on demand JIT compilation
JIT compiling means that we need to obtain executable memory for the
jitted code. That has a non-neglibile cost (in addition to the runtime
cost of compiling the pattern).
Thus, only compile the pattern if we suspect it to be worthwhile:
- when we called match multiple times
- or when the string we match against is quite large
We also assume that the JIT generally works, and thus discard the
bytecode immediately after jitting – if the JIT fails once (either to
compile, or with offset failure), we recompile the bytecode and never
JIT again.
Change-Id: I91e9e10c5ab895af730dbb4a9bc85470dd794d1f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/quick/doc/snippets')
0 files changed, 0 insertions, 0 deletions
