View Single Post
  #24   Spotlight this post!  
Unread 02-04-2010, 08:19
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,756
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA

I'm impressed that you were disassembling the code, but the technology used for NXT and for the cRIO are quite different.

Also, while the issue you noticed is real, it isn't really the language or the NXT-G compiler, but the library differences. NXT-G libraries are kid-friendly and very high level. They are in fact written as subVIs in s simplified LV language. If you use the LV toolkit for the NXT, like they do for FTC, you can write much lower level statements and the overhead goes away.

As an example, in LV, you have a while loop. To construct a While-its-dark loop, a subVI call is dropped and called each iteration of the loop. The subVI is the sensor, and it is wired to the termination. The compiler doesn't know anything about a While-its-dark loop, that is the library and the editor composing something higher level but likely less efficient than you can do if you know the underlying code. Ideally it wouldn't be less efficient, but the flexibility of making While-its-quiet, While-I-have-time, and other loop times usually means tradeoffs. With enough time and effort the template and compiler passes can match hand-coding. But if the language/machine meets the needs of the intended audience, why are you spending money making it faster -- ship it.

As to the cost, ask a mentor how they value a day or week of their time. I believe I'm fully capable of making my own hammer, but I never have. If I want to drive a nail, I buy or borrow a hammer -- nails too. I guess it'd be cool if hammers were free, but wouldn't that really mean subsidized? How does free stuff really happen? The economics and politics is another interesting topic.

Greg McKaskle