From 3815a054b5a1871e00337fb29460ae2bfbb6dfc6 Mon Sep 17 00:00:00 2001 From: Drahflow Date: Tue, 22 Oct 2013 23:39:30 +0200 Subject: Optimization (20% on string scanning workloads) --- compiler/elymasGlobal.ey | 8 +++----- elymas/lib/sys/opt.ey | 8 +++++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/compiler/elymasGlobal.ey b/compiler/elymasGlobal.ey index cca3ad6..3e14219 100644 --- a/compiler/elymasGlobal.ey +++ b/compiler/elymasGlobal.ey @@ -479,8 +479,7 @@ /rsi /rax :movqMemReg @unboxedAbstract /rbp /rax :cmovcqRegReg - 56 /rax :shrqImm8Reg - %F0 /al :andbImmReg # al == type of abstract argument + 60 /rax :shrqImm8Reg # al == type of abstract argument /rdi /rsi :movqMemReg # rsi == address of concrete argument 63 /rsi :btrqImm8Reg @@ -488,12 +487,11 @@ /rsi /rsi :movqMemReg @unboxedConcrete /rbp /rsi :cmovcqRegReg - 56 /rsi :shrqImm8Reg - %F0 /sil :andbImmReg # sil = type of concrete argument + 60 /rsi :shrqImm8Reg # sil = type of concrete argument /al /sil :cmpbRegReg /typedNonCommon :jnzLbl8 # non-equal types - %E0 /al :testbImmReg + %0E /al :testbImmReg /typedNonCommon :jnzLbl8 # non-trivial types 8 /rdi :addqImm8Reg diff --git a/elymas/lib/sys/opt.ey b/elymas/lib/sys/opt.ey index 72f1897..df315f7 100644 --- a/elymas/lib/sys/opt.ey +++ b/elymas/lib/sys/opt.ey @@ -265,9 +265,11 @@ i 3 sub logic * ==thirdLast { ==e - 0 e * STATICTYPED streq { 4 e * sys .typed .type 0 eq }' andif - 0 e * PUSH streq { 1 e * sys .typed .type 0 eq }' andif - or + [ + 0 e * STATICTYPED streq { 4 e * sys .typed .type 0 eq }' andif + 0 e * PUSH streq { 1 e * sys .typed .type 0 eq }' andif + 0 e * STRINGSTAR streq + ] any } /holdsInt deffd action CALL streq -- cgit v1.2.3