Mercurial > vim
view src/testdir/bench_re_freeze.vim @ 18150:0ec6521e9d80 v8.1.2070
patch 8.1.2070: mouse code is spread out
Commit: https://github.com/vim/vim/commit/b8ff5c271ee5dcef6f63436b77e228e062ff9a0e
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Sep 23 21:16:54 2019 +0200
patch 8.1.2070: mouse code is spread out
Problem: Mouse code is spread out.
Solution: Move mouse terminal code parsing to mouse.c. (Yegappan Lakshmanan,
closes #4966)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 23 Sep 2019 21:30:04 +0200 |
parents | adfbffe1e642 |
children |
line wrap: on
line source
"Test for benchmarking the RE engine so small.vim if !has("reltime") | finish | endif func! Measure(file, pattern, arg) for re in range(3) let sstart=reltime() let cmd=printf("../vim -u NONE -N --cmd ':set re=%d'". \ " -c 'call search(\"%s\", \"\", \"\", 10000)' -c ':q!' %s", re, escape(a:pattern, '\\'), empty(a:arg) ? '' : a:arg) call system(cmd. ' '. a:file) $put =printf('file: %s, re: %d, time: %s', a:file, re, reltimestr(reltime(sstart))) endfor endfunc