diff options
author | Greg Kurz <gkurz@linux.vnet.ibm.com> | 2015-05-28 15:13:19 +0200 |
---|---|---|
committer | Alexey Kardashevskiy <aik@ozlabs.ru> | 2015-05-29 14:57:30 +1000 |
commit | 4c7a70f0619534f5870d4043f1751259046db02f (patch) | |
tree | 0fce77daf40167fa85b7ad79b6cf4a16a475dde3 /board-js2x | |
parent | 57ca8e04b426aed43d51eb67805abd5eb9c4449f (diff) | |
download | SLOF-4c7a70f0619534f5870d4043f1751259046db02f.zip SLOF-4c7a70f0619534f5870d4043f1751259046db02f.tar.gz SLOF-4c7a70f0619534f5870d4043f1751259046db02f.tar.bz2 |
fbuffer: introduce the invert-region helper
The inner loop in fb8-toggle-cursor can be implemented with hv-logical-memop
in board-qemu and get an incredible performance boost.
Let's introduce a per-board helper:
- board-js2x: slow RB based, taken from current fb8-toggle-cursor
- board-qemu: faster hv-logical-memop based
With standard graphical settings on board-qemu, we go from 512 hcall
invocations per character down to 16.
Suggested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Diffstat (limited to 'board-js2x')
-rw-r--r-- | board-js2x/slof/helper.fs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/board-js2x/slof/helper.fs b/board-js2x/slof/helper.fs index 34d60da..918fdc4 100644 --- a/board-js2x/slof/helper.fs +++ b/board-js2x/slof/helper.fs @@ -26,3 +26,7 @@ s" , " $cat bdate2human $cat encode-string THEN ; + +: invert-region ( addr len -- ) + 0 ?DO dup dup rb@ -1 xor swap rb! 1+ LOOP drop +; |