bfmat / AutonomousVehicleSteering

A codebase for the roboRIO designed to handle steering data from an autonomous driving vision system.
0 stars 0 forks source link

It's in C++ #1

Closed Redrield closed 7 years ago

Redrield commented 7 years ago

I recommend a rewrite using wpilibj and Kotlin

bfmat commented 7 years ago

y tho

Redrield commented 7 years ago

bcuz C++ is a bad old language, and Hotspot JIT can approach it in performance.

ericalbers commented 7 years ago

BS, no JIT can compare to compiled C code, not even close any 'stats' I've ever seen are total BS

bfmat commented 7 years ago

@ericalbers @Redrield https://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=java&lang2=gpp

ericalbers commented 7 years ago

one of hundreds of rants about JIT vs compiled https://www.gamedev.net/forums/topic/527814-jit-compiled-code-vs-native-machine-code/ In the end, every time someone actually TIMES 2 pieces of code, the compiled version wins big, by like 2x big. And all the JITTERS run and yell saying you can't compare two pieces of code because they are not the same yayayaya....end of day, note one thing. Whens the last time you saw a A title video game written in Java with video performance in the top tier of games? If you think minecraft your crazy, that game is SLOW, its rendering is low res...its an A title because its fun, very fun.... Find a Assassin's creed written with JIT...or Call of Duty in java...hahahahaha not gonna happen for a reason... If its FASTER games will BE there, they live and die by framerate

bfmat commented 7 years ago

@ericalbers Good points. Keep in mind though Unity uses C#, not really a low-level language. iOS is well known for being optimized and many apps, including parts of the operating system, are written in Swift, a high level language that performs a bit better than Java, but not a ton. The difference between that and Minecraft is that those have optimized low-level graphical libraries written in C that are controlled by the high-level language. High-level languages are good, just not for writing a rendering engine I guess...

Whereas Minecraft, I think it writes all kinds of nasty low level stuff in Java.

At least C# and Swift are compiled not interpreted!

ericalbers commented 7 years ago

Unity uses C# as a scripting language, its a good move, same with using something like python in scripts for games....used to be everyone wrote their own script language for their game engine to parse high level game level stuff, like OpenDoor(doorid) or TriggerArea(x,y,xsize,ysize,id) to allow the game designers the ability to customize the levels without using programmers...unity does not render its 3d in c# :-) High level languages are great for quick/easy coding to test, try stuff out, but when time==money, compiled is always where you end up

Redrield commented 7 years ago

Back to what @brendon-ai said LWJGL is built upon native code doing most of the work. Similar can be said about WPILib. I did a quick grep through the pure wpilib library alone, and there are over 300 native method declarations sprinkled throughout, if fernflower is to be believed. That's excluding other necessary libraries like CANTalon

Redrield commented 7 years ago

(There are over 100 declarations including "native" in CANTalon)