Mercurial > vim
changeset 25324:af0fd37ae687 v8.2.3199
patch 8.2.3199: Vim9: execution speed can be improved
Commit: https://github.com/vim/vim/commit/a74901929e999a0052c1ce388ab09359c10cbb0d
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jul 22 12:26:14 2021 +0200
patch 8.2.3199: Vim9: execution speed can be improved
Problem: Vim9: execution speed can be improved.
Solution: Make the break counter static.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 22 Jul 2021 12:30:04 +0200 |
parents | 605f57b8433c |
children | 6d48afa9f12d |
files | src/version.c src/vim9execute.c |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/version.c +++ b/src/version.c @@ -756,6 +756,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3199, +/**/ 3198, /**/ 3197,
--- a/src/vim9execute.c +++ b/src/vim9execute.c @@ -1526,8 +1526,6 @@ handle_debug(isn_T *iptr, ectx_T *ectx) static int exec_instructions(ectx_T *ectx) { - int breakcheck_count = 0; - typval_T *tv; int ret = FAIL; int save_trylevel_at_start = ectx->ec_trylevel_at_start; @@ -1539,7 +1537,9 @@ exec_instructions(ectx_T *ectx) for (;;) { + static int breakcheck_count = 0; // using "static" makes it faster isn_T *iptr; + typval_T *tv; if (++breakcheck_count >= 100) {