From 3d03f3a4a94434d6e5e58993d33137c84b0f4eda Mon Sep 17 00:00:00 2001 From: crc Date: Wed, 18 Dec 2019 17:18:26 +0000 Subject: [PATCH] retro.forth: use inline assembly in `copy` to improve performance FossilOrigin-Name: ed855663f4a9203ad3882c44bdea4f783d44221e7983bc572c408d2f2e36f514 --- image/retro.forth | 5 ++++- ngaImage | Bin 38568 -> 38568 bytes vm/nga-c/retro-image.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/image/retro.forth b/image/retro.forth index a8021bb..1db13df 100644 --- a/image/retro.forth +++ b/image/retro.forth @@ -633,8 +633,11 @@ stored value, and updating with the resulting value. I have a simple word `copy` which copies memory to another location. + :copy (aan-) [ &fetch-next dip store-next ] times drop drop ; + ~~~ -:copy (aan-) [ &fetch-next dip store-next ] times drop drop ; +:copy (aan-) + [ \puduliad `1 \swfepodu \liadpust `1 \po...... ] times drop drop ; ~~~ ## Lexical Scope diff --git a/ngaImage b/ngaImage index 35a8c0774b14d3dd907357e3720f6801ce3831e2..5a0ab3ecb46f9d99cb5e845becbcfb309af24e9e 100644 GIT binary patch delta 36 ocmZ3nmTARWrVR>)qO44ef{Y9d3@rR?Ko+Y2h|RXy)UY@e0EcV_82|tP delta 36 mcmZ3nmTARWrVR>)qKpg-3>HAl$icv11;ilQdb6ovaVh|e1qOZq diff --git a/vm/nga-c/retro-image.c b/vm/nga-c/retro-image.c index 4d35320..e0a225e 100644 --- a/vm/nga-c/retro-image.c +++ b/vm/nga-c/retro-image.c @@ -160,7 +160,7 @@ CELL ngaImage[] = { 1793,14532,15076,15118,202001,0,10,1,10,2,10,3,10,4,10,5,10, 3092,144,118,58,112,114,101,115,101,114,118,101,0,4,2,15,1793,3102,1,21, 2049,2106,10,1,3097,2049,2106,4,16,10,3078,3121,144,118,58,117,112,100,97,116, 101,0,4,1793,3128,15,4,8,10,1,3124,2049,2116,16,10,3109,3142,144,99,111, - 112,121,0,1793,3151,1,56,2049,2106,2049,59,10,1,3144,2049,2281,3,3,10,3134, + 112,121,0,1793,3151,285278725,1,33951492,268767489,1,6,10,1,3144,2049,2281,3,3,10,3134, 3171,144,83,99,111,112,101,76,105,115,116,0,14982,15034,10,3158,3180,144,123,123, 0,2049,1570,2,1,3171,2049,59,16,10,3174,3205,144,45,45,45,114,101,118,101, 97,108,45,45,45,0,2049,1570,1,3171,2049,2893,16,10,3189,3219,144,125,125,0,