To: Gordon Keller From: Bob Krivacic Subject: Memory Move Comparison Date: June 22, 1987 Here's the results of comapring the DayBreak and Tamarin memory copys. The test was coded to represent the code which the compiler would produce when doing a Common Lisp string or Vector copy. The Tamarin timing using memory running at DayBreak memory speeds was done by adding an appropriate cycle to each memory reference (including the jump delay instruction fetch time). The results are as follows: COPY WORDS A function to move 32 bit words in memory was coded to compare the relative performance of memory move operations. Since string copy & copy-vector (the common lisp memory move funcions) compile into coded loops to move memory it seemed a suitable method of comparison. The data blocks moved were assumed to be raw storage (therefore no garbage collection / reference counting was performed). The DayBreak opcodes used for the function are as follows: 50: 102 IVAR len 51: 153 '1 52: 331 IDIFFERENCE 53: 154 2 SIC 2 55: 326 TIMES2 56: 152 '0 57: 21 2 1 BIND [pvar0] [pvar1]; 62: 111 PVAR [pvar1] 63: 110 PVAR [pvar0] 64: 363 GREATERP 65: 221 FJUMP-> 70 66: 150 'NIL 67: 20 RETURN 70: 101 IVAR b 71: 111 PVAR [pvar1] 72: 320 ADDBASE 73: 100 IVAR a 74: 111 PVAR [pvar1] 75: 320 ADDBASE 76: 310 0 GETBASE.N 100: 315 0 PUTBASE.N 102: 277 POP 103: 111 PVAR [pvar1] 104: 153 '1 105: 324 PLUS2 106: 131 PVAR_ [pvar1] 107: 260 354 JUMPX-> 63 The equivalent Tamarin code was then coded and is as follows with execution frequency & cycle counts shown: Opcode cycles frequency tot cycles + DBreak IVAR len 1 1 1 PVAR_^ [pvar0] 1 1 1 '0 1 1 1 PVAR_^ [pvar1] 1 1 1 PVAR [pvar1] 1 1 1 loop PVAR [pvar0] 1 n n GREATERP True 1 1 1 False n 2 2n TJUMP ret True 1 6 6 False n 1 n IVAR b n 1 n PVAR [pvar1] n 1 n ADDBASE n 1 n IVAR a n 1 n PVAR [pvar1] n 1 n ADDBASE n 1 n GETBASE.N 0 n 2 2n 1n PUTBASE.N 0 n 2 2n 1n POP n 1 n PVAR [pvar1] n 1 n ADD.N 1 n 1 n PVAR [pvar1] n 1 n NJUMPX loop n 6 6n 1n ret 'NIL 1 1 1 RETURN 5 1 5 -------- Tamarin CMos I Timing 18 + 24n Tamarin with DayBreak speed memory 18 + 24n + 3n COMPUTATIONS n = 10: 18 + 24 x 10 = 258 cycles x 100 ns = .0258 ms .020 ms + (10 x 3 x 100 ns) = .0288 ms n = 256: 18 + 24 x 256 = 6162 cycles x 100 ns = .6162 ms .492 ms + (256 x 3 x 100 ns) = .6930 ms n = 500: 18 + 24 x 500 = 12018 cycles x 100 ns = 1.2018 ms .961 ms + (500 x 3 x 100 ns) = 1.3518 ms RESULTS Results @ 10 Words: x DayBreak Tamarin CMos I (DayBreak Memory) .0288 ms 12 Tamarin CMos I (Normal Memory) .0258 ms 13 DayBreak .36 ms 1 Results @ 256 Words: x DayBreak Tamarin CMos I (DayBreak Memory) .6930 ms 10 Tamarin CMos I (Normal Memory) .6162 ms 12 DayBreak 7.56 ms 1 Results @ 500 Words: x DayBreak Tamarin CMos I (DayBreak Memory) 1.3518 ms 10 Tamarin CMos I (Normal Memory) 1.2018 ms 12 DayBreak 14.71 ms 1 ?1(DEFAULTFONT 1 (GACHA 10) (GACHA 8) (TERMINAL 8)) GACHA Ç[ Ikzº