• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Revisionaf0fd37ae6875aa27105659a139dbb06a342f1e1 (tree)
Time2021-07-22 19:30:04
AuthorBram Moolenaar <Bram@vim....>
CommiterBram Moolenaar

Log Message

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.

Change Summary

Incremental Difference

diff -r 605f57b8433c -r af0fd37ae687 src/version.c
--- a/src/version.c Thu Jul 22 12:00:06 2021 +0200
+++ b/src/version.c Thu Jul 22 12:30:04 2021 +0200
@@ -756,6 +756,8 @@
756756 static int included_patches[] =
757757 { /* Add new patch number below this line */
758758 /**/
759+ 3199,
760+/**/
759761 3198,
760762 /**/
761763 3197,
diff -r 605f57b8433c -r af0fd37ae687 src/vim9execute.c
--- a/src/vim9execute.c Thu Jul 22 12:00:06 2021 +0200
+++ b/src/vim9execute.c Thu Jul 22 12:30:04 2021 +0200
@@ -1526,8 +1526,6 @@
15261526 static int
15271527 exec_instructions(ectx_T *ectx)
15281528 {
1529- int breakcheck_count = 0;
1530- typval_T *tv;
15311529 int ret = FAIL;
15321530 int save_trylevel_at_start = ectx->ec_trylevel_at_start;
15331531
@@ -1539,7 +1537,9 @@
15391537
15401538 for (;;)
15411539 {
1540+ static int breakcheck_count = 0; // using "static" makes it faster
15421541 isn_T *iptr;
1542+ typval_T *tv;
15431543
15441544 if (++breakcheck_count >= 100)
15451545 {
Show on old repository browser