To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 21954
21953  |  21955
Subject: 
Re: nop in NQC?
Newsgroups: 
lugnet.robotics
Date: 
Wed, 7 Jan 2004 13:54:19 GMT
Viewed: 
963 times
  
In lugnet.robotics, John Hansen wrote:
In lugnet.robotics, Brian Davis wrote:
Is there a NQC command that will translate to a simple nop bytecode?

Here's a program that tries to analyze the various NOP options:

<snipped>
Based on this I would go with NOP3().  NOP2() is a decent second choice.

Or you can just forget all that.  I ran the same test with the order changed and
the 3rd NOP of the 5 I tried was always the fastest (regardless of which one I
used).  Modifying the program to try each of 5 different options in 10 different
orders yielded these results:

__nolist void NOP1() { Wait(0); }
__nolist void NOP2() { asm { 0x10 }; }
__nolist void NOP3() { asm { 0xe0 }; }
__nolist void NOP4() { Wait(-1); }
__nolist void NOP5() { asm { 0x27, 1 }; }

NOP1()  NOP2()  NOP3()  NOP4()  NOP5()
0.63    0.57    0.60    0.61    0.61

Perhaps these numbers really do reflect reality.

John Hansen



Message is in Reply To:
  Re: nop in NQC?
 
(...) Here's a program that tries to analyze the various NOP options: #pragma reserve 0 __nolist void NOP1() { Wait(0); } __nolist void NOP2() { Wait(-1); } __nolist void NOP3() { asm { 0x27, 1 }; } __nolist void NOP4() { asm { 0x10 }; } __nolist (...) (21 years ago, 6-Jan-04, to lugnet.robotics)

8 Messages in This Thread:






Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR