lesson learned from http://k1024.org/~iusty/blog/entry/perf-null/ – add -DMKSH_SMALL_BUT_FAST which gives more speed (8/20K less cycles, 5/9K less insns, 1.8/2.4k less branches, 65/275 less branch misses) on Debian/amd64 (klibc-static/eglibc) at cost of 0/2 more page faults and 6K/6K more text size
This commit is contained in:
4
edit.c
4
edit.c
@ -28,7 +28,7 @@
|
||||
|
||||
#ifndef MKSH_NO_CMDLINE_EDITING
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.238 2012/07/01 15:36:18 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.239 2012/07/01 15:54:53 tg Exp $");
|
||||
|
||||
/*
|
||||
* in later versions we might use libtermcap for this, but since external
|
||||
@ -88,7 +88,7 @@ static int x_vi(char *, size_t);
|
||||
#endif
|
||||
|
||||
#define x_flush() shf_flush(shl_out)
|
||||
#ifdef MKSH_SMALL
|
||||
#if defined(MKSH_SMALL) && !defined(MKSH_SMALL_BUT_FAST)
|
||||
#define x_putc(c) x_putcf(c)
|
||||
#else
|
||||
#define x_putc(c) shf_putc((c), shl_out)
|
||||
|
Reference in New Issue
Block a user