To: vim_dev@googlegroups.com Subject: Patch 8.2.3199 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3199 Problem: Vim9: execution speed can be improved. Solution: Make the break counter static. Files: src/vim9execute.c *** ../vim-8.2.3198/src/vim9execute.c 2021-07-20 22:21:54.329987712 +0200 --- src/vim9execute.c 2021-07-22 12:15:06.151855812 +0200 *************** *** 1526,1533 **** 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; --- 1526,1531 ---- *************** *** 1539,1545 **** --- 1537,1545 ---- for (;;) { + static int breakcheck_count = 0; // using "static" makes it faster isn_T *iptr; + typval_T *tv; if (++breakcheck_count >= 100) { *** ../vim-8.2.3198/src/version.c 2021-07-22 11:46:55.502419535 +0200 --- src/version.c 2021-07-22 12:25:50.970633987 +0200 *************** *** 757,758 **** --- 757,760 ---- { /* Add new patch number below this line */ + /**/ + 3199, /**/ -- hundred-and-one symptoms of being an internet addict: 201. When somebody asks you where you are, you tell them in which chat room. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///