Mercurial > vim
comparison src/highlight.c @ 20392:4c317d8c1051 v8.2.0751
patch 8.2.0751: Vim9: performance can be improved
Commit: https://github.com/vim/vim/commit/7e9f351b2e69b498c4ee5004d7459844e1ba191a
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed May 13 22:44:22 2020 +0200
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().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 13 May 2020 22:45:04 +0200 |
parents | 1acf700beb9c |
children | c2570baa2e4c |
comparison
equal
deleted
inserted
replaced
20391:9ceee4daa596 | 20392:4c317d8c1051 |
---|---|
3741 linenr_T toplnum = 0; | 3741 linenr_T toplnum = 0; |
3742 linenr_T botlnum = 0; | 3742 linenr_T botlnum = 0; |
3743 listitem_T *li; | 3743 listitem_T *li; |
3744 int i; | 3744 int i; |
3745 | 3745 |
3746 range_list_materialize(pos_list); | 3746 CHECK_LIST_MATERIALIZE(pos_list); |
3747 for (i = 0, li = pos_list->lv_first; li != NULL && i < MAXPOSMATCH; | 3747 for (i = 0, li = pos_list->lv_first; li != NULL && i < MAXPOSMATCH; |
3748 i++, li = li->li_next) | 3748 i++, li = li->li_next) |
3749 { | 3749 { |
3750 linenr_T lnum = 0; | 3750 linenr_T lnum = 0; |
3751 colnr_T col = 0; | 3751 colnr_T col = 0; |