Patch 8.2.3199

7 views
Skip to first unread message

Bram Moolenaar

unread,
Jul 22, 2021, 6:27:35 AM7/22/21
to vim...@googlegroups.com

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 -- Br...@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 ///
Reply all
Reply to author
Forward
0 new messages