0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.0751: Vim9: performance can be improved

Problem:    Vim9: performance can be improved.
Solution:   Don't call break.  Inline check for list materialize.  Make an
            inline version of ga_grow().
This commit is contained in:
Bram Moolenaar
2020-05-13 22:44:22 +02:00
parent 37d1b4f941
commit 7e9f351b2e
17 changed files with 89 additions and 79 deletions

View File

@@ -98,7 +98,7 @@ set_padding_border(dict_T *dict, int *array, char *name, int max_val)
array[i] = 1;
if (list != NULL)
{
range_list_materialize(list);
CHECK_LIST_MATERIALIZE(list);
for (i = 0, li = list->lv_first; i < 4 && i < list->lv_len;
++i, li = li->li_next)
{
@@ -516,7 +516,7 @@ handle_moved_argument(win_T *wp, dictitem_T *di, int mousemoved)
int mincol;
int maxcol;
range_list_materialize(l);
CHECK_LIST_MATERIALIZE(l);
li = l->lv_first;
if (l->lv_len == 3)
{
@@ -756,7 +756,7 @@ apply_general_options(win_T *wp, dict_T *dict)
listitem_T *li;
int i;
range_list_materialize(list);
CHECK_LIST_MATERIALIZE(list);
for (i = 0, li = list->lv_first; i < 4 && i < list->lv_len;
++i, li = li->li_next)
{
@@ -790,7 +790,7 @@ apply_general_options(win_T *wp, dict_T *dict)
if (list != NULL)
{
range_list_materialize(list);
CHECK_LIST_MATERIALIZE(list);
for (i = 0, li = list->lv_first; i < 8 && i < list->lv_len;
++i, li = li->li_next)
{
@@ -845,7 +845,7 @@ apply_general_options(win_T *wp, dict_T *dict)
break;
}
else
range_list_materialize(li->li_tv.vval.v_list);
CHECK_LIST_MATERIALIZE(li->li_tv.vval.v_list);
}
}
if (ok)