Mercurial > vim
view src/testdir/bench_re_freeze.vim @ 19940:724417668d42 v8.2.0526
patch 8.2.0526: Gcc 9 complains about empty statement
Commit: https://github.com/vim/vim/commit/86b9a3e8cd24335195dbe377b98bed1ba291268d
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Apr 7 19:57:29 2020 +0200
patch 8.2.0526: Gcc 9 complains about empty statement
Problem: Gcc 9 complains about empty statement.
Solution: Add {}. (Dominique Pelle, closes https://github.com/vim/vim/issues/5894)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 07 Apr 2020 20:00: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