In SX Microcontrollers, SX/B Compiler and SX-Key Tool, John Kauffman wrote: [3]I'm thinking through the relative speeds of BASIC STAMP and SX. Some of these thoughts reflect my lack of a degree in Comp Sci, so please correct me when wrong.[/3] [3] [/3] [3]The catalog specs are something like:[/3] [3]STAMP speed = 20-50 Mhz [/3] [3]SX speed = up to 74 MHz[/3] [3] [/3] [3]This implies the SX is up to four times faster. Are we actually comparing apples to apples?[/3] [3] [/3] [3]For the STAMP:[/3] [3]Obviously each cycle / sec can not be execution of a BASIC command / sec (or even of tokens / sec)[/3] [3]I assume the stated speeds are for processor cycles / sec and that it takes several cycles for each Token. [/3] [3]I'm thinking it would take many cycles to make the several assembly commands need to execute one BASIC command. [/3] [3] [/3] [3]SX:[/3] [3]Again, the 75 Mhz must be the number of processor cycles per second[/3] [3]Again, 2-5 cycles per assembly command[/3] [3]Again, several assembly commands per SX/B command[/3] [3]So I am thinking that in the end the actual number of SX/B commands executed per second is similar to the STAMP[/3] [3] [/3] [3]What I am wondering:[/3] [3]1 - If code is written in PBASIC and SX/B and then executed on a 50 Mhz STAMP and a 75 Mhz SX, is there really much difference in the speed that tasks are completed? Is the ratio of tasks completed any more then the ration of MHz (75/50)?[/3] [3]2 - Is the main speed difference the fact that you have the option of writing assembly for SX? [/3] [3]3 - But even if you do write for SX in assembly, can you really cut down on the number of cycles needed to perform a task? [/3] [3]4 - Could the SX running SX/B actually be slower because its compiler is not optimized and, presumably, the STAMP tokenizer & interpreter are better optimized?[/3] [3]5 - Am I right to conclude that for users of PBASIC on 50 Mhz STAMPS moving to SX/B on SX at 75 MHz, speed is not a major difference.[/3] [3]6 - To bring to a practically example, if I am timing very short events (microseconds), can I get significantly better resolution in SX/B on a SX running at 75Mhz then in PBASIC on a 50Mhz stamp? [/3] [3] [/3] [3]Having said that, the different architectures lead to other speed advantages, like the speed of an SX table look-up compared to STAMP getting the data from a table in EEPROM.[/3] [3] [/3] [3]- Thanks[/3] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=148639 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)