| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Performance of high-resolution time (clock_gettime via uv_hrtime) is
expensive on some systems. For profiling VimL, syntax, etc., we don't
care about nanosecond-precision and monotonicity edge-cases, so avoid
uv_hrtime().
closes #10328
From the uv__hrtime() source:
https://github.com/libuv/libuv/blob/0cdb4a5b4b706d0e09413d9270da28f9a88dc083/src/unix/linux-core.c#L442-L462
/* Prefer CLOCK_MONOTONIC_COARSE if available but only when it has
* millisecond granularity or better. CLOCK_MONOTONIC_COARSE is
* serviced entirely from the vDSO, whereas CLOCK_MONOTONIC may
* decide to make a costly system call.
*/
This micro-benchmark (Debug build) shows negligible differences on my
system:
#include <sys/time.h>
...
proftime_T tm = profile_start();
int trials = 999999;
int64_t t = 0;
struct timeval tv;
for (int i = 0; i < trials; i++) {
t += gettimeofday(&tv,NULL);
}
tm = profile_end(tm);
ILOG("%d trials of gettimeofday: %s", trials, profile_msg(tm));
tm = profile_start();
for (int i = 0; i < trials; i++) {
t += os_hrtime();
}
tm = profile_end(tm);
ILOG("%d trials of os_hrtime: %s", trials, profile_msg(tm));
tm = profile_start();
for (int i = 0; i < trials; i++) {
t += os_utime();
}
tm = profile_end(tm);
ILOG("%d trials of os_utime: %s", trials, profile_msg(tm));
ILOG("%zu", t);
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Travis CI, -Wmissing-prototypes gives strange error:
In file included from ../src/nvim/eval.c:5965:
/home/travis/build/neovim/neovim/build/src/nvim/auto/funcs.generated.h.gperf:215:1: error: conflicting types for 'find_internal_func_gperf'
find_internal_func_gperf (register const char *str, register unsigned int len)
^
../src/nvim/eval.c:5962:20: note: previous declaration is here
const VimLFuncDef *find_internal_func_gperf(register const char *str,
^
|
|
|
| |
closes #9522
|
| |
|
|
|
|
|
| |
Otherwise the symbols defined in config/config.h.in may not be defined,
depending on include-order.
|
| |
|
| |
|
| |
|
|
|
|
| |
The intentional behavior of do_sub was checked in vim
|
|
|
|
|
|
|
|
|
|
|
|
| |
MSVC does not handle __VA_ARGS__ as expected in STATIC_ASSERT, avoid its use
to work around it since we don't need it. The underlying issue seems to be one
of
https://connect.microsoft.com/VisualStudio/Feedback/Details/1232378
https://connect.microsoft.com/VisualStudio/Feedback/Details/1099052
The bug only seems to manifest when using multiple variadic macros that call
each other.
|
|
|
|
| |
Also makes sure that compiler will error out when new name is longer then
vv_filler.
|
|
Can be quite handy, attempt to provide fallbacks for compilers that don't
support _Static_assert (which is technically a C11 feature). Suppress
warnings as best we can (Clang and GCC warn that we're using a C11 feature
while in C99 mode).
Needs to be tested for MSVC still.
|