4 ms·
> The TruffleC engine is roughly competitive with GCC It is not surprising in sense Java is competitive to C/C++ as per many Java developers.
by geodel 10y ago
> The TruffleC engine is roughly competitive with GCC
It is not surprising in sense Java is competitive to C/C++ as per many Java developers.
- pjmlp 10y agoI work with .NET, Java and C++ stacks. In many use cases, C++ might win the benchmark game, but the end user will not notice any difference in human time. The biggest issue is of course than one needs to learn how to optimize code, use the right algorithms and data structures in first place.
- geodel 10y agoI agree mostly. Any Java application which does not need GUI other than web is just fine in most use cases.
- the_duke 10y agoUIs though... I haven't worked with a single Java based GUI application that did feel smooth, fast and efficient. I wonder why that is.
- pjmlp 10y agoBecause most developers don't care and code everything on the UI thread. Additionally Swing has bad defaults, so it requires effort to make the required set of calls to make them look better. Back in the Sun glory days, there were Sun blogs like Filthy Rich Clients, which lead eventually to a book http://filthyrichclients.org/ http://filthyrichclients.org/. It was a consequence of Sun not getting what it means developing GUIs for the consumer systems, think that their Solaris UIs (SunView, OpenWindows, CDE) weren't that great in that area. So most Java developers stick with the defaults and as such the majority of Java based applications send the wrong message.
- vvanders 10y agoAndroid does a bunch of things to keep you off the UI thread(IO throws an exception, handlers, Async Tasks, etc). You still have to GC at some point and when that happens chances are you're going to drop frames. Unless you're very aware of the garbage you're creating you'll take more than ~5ms which is usually enough to push you over 16ms with the other work that goes on during a frame.
- pjmlp 10y agoMeasure Java performance by how Android works is not a good measure. Dalvik is well known on Java world for having a JIT and GC implementations that worse than what most commercial embedded JVM are capable of. Things have improved with ART, but even there there are quite a few performance improvements that Google could eventually do. Soft real time Java GCs for embedded devices are being used in ground station controls of missiles and a couple of US Navy weapon systems. They surely don't want GC glitches in battle situations. The Android team seems to only bother with "good enough" in what concerns Android performance. As a side note, just check how many Android releases are they going through and yet real-audio support isn't quite there. Even Windows Phone has better support for it, and they do have WinRT and .NET on them.
- bitmapbrother 10y ago>Even Windows Phone has better support for it, and they do have WinRT and .NET on them. No they don't. Point me to one windows phone audio app that has low latency audio.
- pjmlp 10y agoWell there are these sources from Microsoft: https://blogs.windows.com/buildingapps/2014/05/15/real-time-audio-in-windows-store-and-windows-phone-apps/ https://blogs.windows.com/buildingapps/2014/05/15/real-time-... https://rtaudiowsapps.codeplex.com/ https://rtaudiowsapps.codeplex.com/ https://channel9.msdn.com/Events/Build/2014/3-548 https://channel9.msdn.com/Events/Build/2014/3-548 And I just found this, but not sure how good it fares. https://www.microsoft.com/en-us/store/apps/audio-meter/9wzdncrdkgt7 https://www.microsoft.com/en-us/store/apps/audio-meter/9wzdn...
- merb 10y agodo you use or know cyberduck?
- spriggan3 10y ago> In many use cases, C++ might win the benchmark game, but the end user will not notice any difference in human time. If the program runs on the user's machine, I'm pretty certain the users WILL notice the difference, memory wise.