raster pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=8585c3e9c273181d1d55b9495019cd8b0c220438

commit 8585c3e9c273181d1d55b9495019cd8b0c220438
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Fri Oct 25 23:37:10 2013 +0900

    maybe speed up term scroll byt skipping compare work
    
    since nothing useful is actually done unless either oldc or newc have
    a media char - then try return/skip early. might speed up by 2-5%...
    (i see 4.05 vs 4.15 or so cat times for a test case).
---
 src/bin/termpty.c | 3 ++-
 src/bin/termpty.h | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/bin/termpty.c b/src/bin/termpty.c
index 89b0b34..fe7b4f9 100644
--- a/src/bin/termpty.c
+++ b/src/bin/termpty.c
@@ -1436,7 +1436,8 @@ _handle_block_codepoint_overwrite(Termpty *ty, int oldc, 
int newc)
 {
    Termblock *tb;
    int ido = 0, idn = 0;
-   
+
+   if (!((oldc | newc) & 0x80000000)) return;
    if (oldc & 0x80000000) ido = (oldc >> 18) & 0x1fff;
    if (newc & 0x80000000) idn = (newc >> 18) & 0x1fff;
    if (((oldc & 0x80000000) && (newc & 0x80000000)) && (idn == ido)) return;
diff --git a/src/bin/termpty.h b/src/bin/termpty.h
index 13203b5..c5e4672 100644
--- a/src/bin/termpty.h
+++ b/src/bin/termpty.h
@@ -149,18 +149,18 @@ struct _Termcell
 
 struct _Termsave
 {
+   unsigned int   gen  : 8;
    unsigned int   comp : 1;
    unsigned int   z    : 1;
-   unsigned int   gen  : 8;
    unsigned int   w    : 22;
    Termcell       cell[1];
 };
 
 struct _Termsavecomp
 {
+   unsigned int   gen  : 8;
    unsigned int   comp : 1;
    unsigned int   z    : 1;
-   unsigned int   gen  : 8;
    unsigned int   w    : 22; // compressed size in bytes
    unsigned int   wout; // output width in Termcells
 };

-- 


Reply via email to