paszkows@prlhp1.prl.philips.co.uk (paszkows) (10/31/88)
An article entitled "Parallel Processing with the DisPuter" by C. Philip Winder in the "Proceedings of the 8th occam User Group Technical Meeting" ISBN 90 5199 002 4 has a small section about increasing Transputer efficiency. In particular he mentions as follows: "The compiler produces code to check array bounds. This is necessary to conform to the formal model and can be useful in finding bugs. However, if the checks are suppressed, instruction throughput can increase by up to 40 per cent." My question is how do you do this? ( For information the software is written using Inmos' TDS system ).
cpw@prg.oxford.ac.uk (Phil Winder) (11/07/88)
Referring to C.P. Winder, ``Parallel Processing with the DisPuter'', in Developments using occam, Ed. Jon Kerridge, IOS (1988), a paper presented at the 8th oUG meeting at Sheffield this March, <paszkows@prlhp1> notes that instruction throughput may be increased by up to 40% by suppressing run-time range checking. He asks: > My question is how do you do this? ( For information the software is written > using Inmos' TDS system ). The essentials of the program used to obtain these figures are given below: --1 a[i] := b[c[i]] -- contrived example. []INT a, b, c: INT i: a[i] := b[c[i]] --2 a[i] := b[i] + c[i] -- slightly less contrived example a[i] := b[i] + c[i] Using a T414B-20 on-chip memory with the TDS2-beta release software gave: checking on: 69; 77 checking off: 45; 53 cycles. Smaller speed increases will follow from typical code. It is not advisable to disable all the error-checking except for highly trusted sections of code, but other efficiency measures I describe may be more acceptable. For example, did you know that assignment of a constant to a local variable in on-chip RAM can take 9 cycles? (2.2 MIPS for T414-20) To answer the question, a simple compiler switch can disable run-time checking on all versions of PC-based TDS that I've seen. In response to <paszkows@prlhp1>'s follow-up article: beware RETYPEing ! The compiler will allow you to RETYPE at will but it only works if the word boundaries are aligned correctly. So, [5]BYTE byte : INT int RETYPES [byte FROM 1 FOR 4] : looks OK but doesn't work. -Phil. -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ Phil Winder cpw@uk.ac.oxford.prg Programming Research Group Oxford University Computer Laboratory 8-11 Keble Road Oxford. OX1 3QD United Kingdom.