#jogamp @ irc.freenode.net - 20160422 05:06:18 (UTC)


20160422 05:06:18 -jogamp- Previous @ http://jogamp.org/log/irc/jogamp_20160421050618.html
20160422 05:06:18 -jogamp- This channel is logged @ http://jogamp.org/log/irc/jogamp_20160422050618.html
20160422 06:16:23 * elect (~GBarbieri@anon) has joined #jogamp
20160422 06:16:43 <elect> hi
20160422 06:34:55 * jvanek (jvanek@anon) has joined #jogamp
20160422 06:57:09 * jvanek (jvanek@anon) Quit (Quit: Leaving)
20160422 07:25:23 * Eclesia (~husky@anon) has joined #jogamp
20160422 07:26:19 <Eclesia> hi
20160422 07:40:28 * monsieur_max (~maxime@anon) has joined #jogamp
20160422 08:34:02 * jvanek (jvanek@anon) has joined #jogamp
20160422 09:09:05 <rmk0> elect: fighting with #opengl?
20160422 09:09:56 <monsieur_max> rmk0: is there any other way to deal with opengl ?
20160422 09:10:22 <rmk0> monsieur_max: the irc channel #opengl
20160422 09:10:49 <monsieur_max> ah !
20160422 09:11:03 <rmk0> i woke up to a backlog of people telling elect that he needs to use c++
20160422 09:11:05 <elect> I love :D
20160422 09:11:06 <monsieur_max> damn, too bad for my joke :(
20160422 09:11:15 <monsieur_max> haha
20160422 09:11:19 <elect> you would never image
20160422 09:11:34 <elect> I manage to get on pair my jogl version with the C version of McJohn
20160422 09:11:36 <elect> !!!
20160422 09:11:39 <elect> I am so happy
20160422 09:11:44 <elect> did you read it all?
20160422 09:11:46 <rmk0> is best not to mention that you use anything other than c++ in those sorts of places
20160422 09:11:53 <rmk0> i skimmed through it, didn't really follow
20160422 09:11:56 <elect> it was a stupid thing at the end
20160422 09:12:13 <monsieur_max> rmk0: :) neat channel with open minded people i see
20160422 09:12:24 <rmk0> is one of the more hostile rooms on freenode
20160422 09:12:30 <rmk0> #c probably being the most hostile
20160422 09:12:32 <elect> I like hostility
20160422 09:12:34 <elect> :D
20160422 09:12:37 <elect> anyway
20160422 09:12:37 <rmk0> \o/
20160422 09:12:44 <monsieur_max> haha
20160422 09:12:45 <elect> it turned out it was this at the end
20160422 09:12:45 <elect> https://github.com/elect86/glTest/blob/master/glTest/src/glTest/problems/UntexturedObjectsProblem.java#L122-L123
20160422 09:12:57 <elect> I took those two lines outside the loop
20160422 09:13:01 <elect> and SBAM
20160422 09:13:10 <elect> same perfs
20160422 09:13:13 <elect> I got wet ^^
20160422 09:13:14 <rmk0> makes sense
20160422 09:13:34 <rmk0> suddenly x * y * z calls become 1!
20160422 09:13:36 <elect> what surprised us is that the jvm couldn't optimize by itself
20160422 09:13:41 <elect> I wonder
20160422 09:13:50 <elect> that should be quite easy to do
20160422 09:13:52 <rmk0> depends how it was measured
20160422 09:14:04 <elect> I dont know, maybe it's because multiple loops
20160422 09:14:09 <elect> I dont want to investigate
20160422 09:14:42 <elect> so, to sum up guys
20160422 09:15:02 <elect> short story, java shows slowness compared to C/C++ only when cpu bound
20160422 09:15:16 <elect> removed the bounds you are as fast as your C cousins
20160422 09:15:21 <elect> B-)
20160422 09:15:38 * monsieur_max did not understand
20160422 09:15:39 <zubzub> yeah it's like my car
20160422 09:15:45 <zubzub> it's bound by horsepower
20160422 09:15:48 <zubzub> remove that
20160422 09:15:52 <elect> :D
20160422 09:15:52 <zubzub> and it's as fast as a F1
20160422 09:16:03 <elect> if your code is cpu bound
20160422 09:16:14 <elect> then the overhead of java really kicks in
20160422 09:16:20 <monsieur_max> elect: when you talk, it's like spaghetti coming out of your mouth, we don't understand !
20160422 09:16:22 <elect> and C winds hand down
20160422 09:16:30 <elect> but you like spaghetti
20160422 09:16:32 <elect> dont lie
20160422 09:16:42 <monsieur_max> yeah, but i don't want to picture this too much
20160422 09:16:45 <elect> :D
20160422 09:17:12 <elect> so essentially jvm was in my case busy most of time calculating always Math.sin and cos
20160422 09:17:26 <elect> but I noticed that once in 13 seconds or so I was experience high perf
20160422 09:17:30 <monsieur_max> ok, so you're speaking in a opengl context
20160422 09:17:32 <elect> I could see my gpu usage low
20160422 09:17:37 <elect> and sometimes high spikes
20160422 09:17:46 <elect> once every these 13s
20160422 09:17:49 <elect> so I profiles
20160422 09:17:59 <elect> I so the update() function was taking most of the time
20160422 09:18:06 <elect> I tried to comment that shit out and I flied
20160422 09:18:21 <elect> then I moved those two functions outside the 64³ loop
20160422 09:18:29 <elect> and I got it
20160422 09:18:32 <elect> baby
20160422 09:18:32 <monsieur_max> elect: that's why ofen math.sin and cos are not used in game, rather favoring lookup talbes
20160422 09:18:48 <monsieur_max> i type like spaghetti
20160422 09:19:06 <rmk0> https://commons.apache.org/proper/commons-math/apidocs/org/apache/commons/math3/util/FastMath.html
20160422 09:19:19 <rmk0> probably worth trying some of the non-default jvm options
20160422 09:19:22 <zubzub> 11:16 < elect> and C winds hand down
20160422 09:19:26 <zubzub> that'w why I like robovm
20160422 09:19:29 <zubzub> compile any bytecode
20160422 09:19:34 <zubzub> to llvm native code
20160422 09:19:59 <zubzub> and then comes MS and buys and kills it
20160422 09:20:05 <zubzub> -_-
20160422 09:20:12 <elect> :D
20160422 09:20:15 <monsieur_max> zubzub: fork fork
20160422 09:20:25 <zubzub> monsieur_max: https://github.com/FlexoVM/flexovm/issues/4#issuecomment-213112572
20160422 09:21:18 <elect> rmk0, http://blog.element84.com/improving-java-math-perf-with-jafama.html
20160422 09:21:24 <elect> it seems indeed quite faster
20160422 09:21:41 <monsieur_max> zubzub: ah yeah, zubnix, i hate this guy !
20160422 09:21:58 <rmk0> elect: looks good
20160422 09:22:06 <elect> only the ceil, floor, sqrt and toDegree op are slower
20160422 09:23:06 <rmk0> i'm getting 25fps on eight year old intel hardware with full quality SSAO, FXAA, etc... so i'm not all that bothered by how "slow" java is
20160422 09:23:34 <elect> as I said
20160422 09:23:53 <elect> java is slower only if cpu bound
20160422 09:23:56 <zubzub> monsieur_max: this guy == zubnix?
20160422 09:24:02 <elect> I got the idea from this guy
20160422 09:24:03 <elect> http://www.gamedev.net/topic/653886-c-vs-java-an-experience/
20160422 09:24:12 <monsieur_max> zubzub: that was the joke, man :(
20160422 09:24:19 <zubzub> I know I know
20160422 09:24:28 <monsieur_max> i don't really hate you
20160422 09:24:32 <zubzub> that's ok
20160422 09:24:35 <zubzub> I hate zubnix too
20160422 09:24:37 <zubzub> such an asshole
20160422 09:24:39 <monsieur_max> can't say i love you though
20160422 09:24:53 <elect> it's an interesting post, I'd suggest you to take a look at it, guys
20160422 09:26:17 <rmk0> interesting that jafama somehow managed to make toDegrees slower
20160422 09:26:28 <elect> because isnt it?
20160422 09:26:29 <zubzub> elect: from my experience, java's development cycle is much faster than c/cpp
20160422 09:26:36 <elect> I totally agree
20160422 09:26:51 <zubzub> speed is not an issue if you're targetting desktop/server
20160422 09:27:03 <elect> pro: faster dev, no compiling, fast debug
20160422 09:27:11 <elect> con: vm overhead
20160422 09:27:15 <elect> and viceversa
20160422 09:27:15 <zubzub> however if you go embedded you need to become aware
20160422 09:27:23 <zubzub> yup
20160422 09:28:01 <elect> you can be much faster in C, but you must have an hell of a skill (and time)
20160422 09:28:19 <elect> I find java a nice language
20160422 09:28:36 <elect> multiplatform and dev speed are really huge advantages
20160422 09:28:59 <monsieur_max> c# is not bad too
20160422 09:29:03 <zubzub> skill not so much, but time, yes
20160422 09:29:10 <zubzub> *a lot* more time
20160422 09:29:49 <monsieur_max> let's talk about this in #opengl !
20160422 09:29:50 <zubzub> now imagine you could compile java/bytecode to native code
20160422 09:29:54 <zubzub> and have native speed
20160422 09:30:02 <elect> how
20160422 09:30:06 <monsieur_max> zubzub: ever tried excelsior.net ?
20160422 09:30:10 <monsieur_max> .jet
20160422 09:30:14 <zubzub> closed source commercial
20160422 09:30:18 <elect> dont delude me zubzub
20160422 09:30:28 <zubzub> elect: robovm
20160422 09:30:33 <monsieur_max> zubzub: yeah but only working thing
20160422 09:30:33 <zubzub> did just that
20160422 09:30:48 <elect> so, you basically take java and 'compile' it?
20160422 09:30:51 <zubzub> yes
20160422 09:30:57 <zubzub> into a single stand alone native binary
20160422 09:31:02 <elect> do you have some bench scenarios?
20160422 09:31:12 <zubzub> unfortunately not :/
20160422 09:31:25 <zubzub> it was mostly used for ios
20160422 09:31:28 <zubzub> for game
20160422 09:31:30 <elect> or anything to estimate the perf diff?
20160422 09:31:30 <zubzub> libgdx iir
20160422 09:31:40 <zubzub> and it ran very well
20160422 09:32:12 <elect> https://medium.com/@harrycheung/cross-platform-mobile-performance-testing-d0454f5cd4e9#.kmdvl0186
20160422 09:32:18 <elect> "RoboVM — RoboVM is a huge surprise. The performance is on par with J2ObjC consistently, and it’s still in beta."
20160422 09:32:37 <elect> zubzub, you totally got me on robovm
20160422 09:32:40 <elect> you bloody
20160422 09:32:54 <zubzub> https://robovm.com/robovm-winding-down/
20160422 09:33:30 <zubzub> anyway
20160422 09:33:38 <zubzub> that's why I like robovm
20160422 09:33:47 <zubzub> also because it's not tied to java
20160422 09:33:49 <zubzub> but to bytecode
20160422 09:34:02 <zubzub> so any jvm language you can use
20160422 09:34:18 <elect> "RoboVM was especially notable since it used much less memory at peak and in total than Xamarin.
20160422 09:34:20 <elect> "
20160422 09:34:46 <zubzub> the drawback is that it's runtime class libraries are those of android
20160422 09:34:54 <zubzub> so you're stuck on a semi java 7 runtime
20160422 09:35:07 <zubzub> but it has java 8 lamda support though
20160422 09:35:15 <zubzub> the good news is that it's open source
20160422 09:35:20 <elect> but I have one question
20160422 09:35:30 <elect> if you never did some profiles
20160422 09:35:37 <elect> how can you rely so surely on robovm?
20160422 09:35:53 <elect> I mean, I'd like to have some numbers to guarantee me the benefits
20160422 09:36:08 <zubzub> that's still something I need to research :)
20160422 09:36:21 <elect> because what about if you are doing all this mess, and then you are maybe performing the same as java 8?
20160422 09:36:31 <zubzub> good question
20160422 09:36:33 <zubzub> because fuck oracle?
20160422 09:36:37 <elect> ^^
20160422 09:36:56 <elect> although I don't like it too
20160422 09:37:03 <elect> I dont see many others alternatives out there
20160422 09:37:10 <zubzub> one big advantage is that oracle has jdk9 for ios but only with the zero iterpreter
20160422 09:37:28 <zubzub> if you can get robovm with jdk9 support to run on ios
20160422 09:37:48 <zubzub> you'be basically outperformed oracle on the whole ios market
20160422 09:38:21 <zubzub> plus people can then ship a stand alone applicaiton in llvm bitcode (required by apple)
20160422 09:38:28 <zubzub> without needing to rely on oracle jdk
20160422 09:38:42 <monsieur_max> elect: a benefit you'll always have is the instant launch, compared to jvm overhead
20160422 09:38:59 <elect> yeah, but I need numbers
20160422 09:39:10 <monsieur_max> instant vs too long ;)
20160422 09:39:12 <zubzub> elect: the source is out there ;)
20160422 09:39:19 <elect> because if we are talking about 1.3 vs 1.2 ms
20160422 09:39:25 <elect> you do understand it is not worth
20160422 09:39:37 <elect> I am googling but I cant find anything interesting
20160422 09:39:38 <zubzub> my plan is to test it on a n rpi1
20160422 09:39:45 <elect> only robovm vs swift
20160422 09:39:59 <elect> but I dont give a shit about switf honestly
20160422 09:40:01 <zubzub> but I need a good benchmark that is anrdoid compatible
20160422 09:40:05 <elect> I need to compare vs java
20160422 09:40:21 <monsieur_max> elect: with excelsior.jet, you won't have better perf, astoundingly faster
20160422 09:40:29 <elect> ?
20160422 09:40:52 * elect searches
20160422 09:41:31 <elect> http://www.stefankrause.net/wp/?p=9 but 4 years old
20160422 09:41:34 <monsieur_max> the benefit will mostly be startup time and "obfuscated" code
20160422 09:41:37 <elect> http://stackoverflow.com/questions/11542909/has-anyone-benchmarked-excelsior-jet-compile-to-native-against-a-standard-java-r
20160422 09:45:11 <elect> so let me get
20160422 09:45:22 <elect> both robovm and excelsior are AOT
20160422 09:45:29 <elect> ahead of time compilers?
20160422 09:45:34 <monsieur_max> yup
20160422 09:47:00 <elect> https://www.youtube.com/watch?v=Xybzyv8qbOc
20160422 09:47:03 <elect> minute 20
20160422 09:47:14 <elect> startup almost 0.2 s faster
20160422 09:47:36 <elect> on 0.4s average startup time
20160422 09:47:44 <elect> sorry, 0.1 faster
20160422 09:47:51 <zubzub> what kind of hardware?
20160422 09:47:59 <elect> I dunno
20160422 09:48:06 <monsieur_max> deceleron 3000
20160422 09:48:06 <elect> I am skipping ahead for benchs
20160422 09:48:17 <zubzub> another nice thing about robovm is that it can directly link against jni functions
20160422 09:48:28 <zubzub> so there's no dlopen+ function lookup overhead
20160422 09:51:27 <zubzub> they also have something called 'bro', which allows you to map a java native method 1o1 to a C/(objc?) construct (function, struct,...)
20160422 09:51:38 <zubzub> and then directly link against it with 0 overhead
20160422 09:51:49 <zubzub> so you don't need to write jni c code
20160422 09:51:59 <zubzub> basically the same use case as my jaccall library
20160422 09:53:56 <elect> anyway, here monsieur_max they say what you said
20160422 09:53:57 <elect> http://www.excelsiorjet.com/#benefits
20160422 09:54:05 <elect> obfuscation and faster startup
20160422 09:55:11 <monsieur_max> elect: yeah, well, it's because i studied this for my game ;)
20160422 09:56:22 <elect> ^^
20160422 09:56:34 <elect> rmk0, take a look on opengl channel :D
20160422 09:57:17 <rmk0> not worth it, heard all that stuff a hundred times over
20160422 09:57:42 <rmk0> it's 1982 for graphics programmers forever
20160422 10:00:29 <elect> :D
20160422 10:03:54 <zubzub> glbegin glend?
20160422 10:58:50 <elect> trying excelsior
20160422 10:59:05 <elect> zubzub, afai got robovm is only for ios?
20160422 11:12:45 <zubzub> elect: windows, mac, linux, bsd, android, ios
20160422 11:13:05 <zubzub> but it's business case was mostly ios
20160422 11:13:16 <zubzub> as it was the only way to run java on ios
20160422 11:14:14 <elect> what do you think it will happen now?
20160422 11:14:25 <elect> after it shuts down?
20160422 11:14:33 <zubzub> it will die a slow death unless a vibrant community maintains a fork
20160422 11:15:18 <zubzub> basically what I'm will try to do
20160422 11:15:27 <zubzub> there is a good bytecode to llvm compiler now
20160422 11:15:39 <zubzub> I'll be damned if I let it die :p
20160422 11:31:28 <monsieur_max> zubzub: nice project
20160422 11:32:45 <zubzub> if you do it right there might even be some nice $$$ to be made imho
20160422 11:33:03 <zubzub> but for that to work I would need to:
20160422 11:33:11 <zubzub> port robovm fork from android libs to openjdk libs
20160422 11:33:55 <zubzub> port robovm compiler to produce libvm.so and link dynamically against it when compiling a java app
20160422 11:34:16 <zubzub> make fully jdk9 compliant
20160422 11:34:33 <zubzub> starting with jigsaw low level modules and gradually work upward
20160422 11:34:54 <zubzub> (the dynamic linking is needed to work around licensing issues)
20160422 11:34:54 <elect> it sounds like a lot of work
20160422 11:35:06 <zubzub> elect: that never scared me ;)
20160422 11:39:38 <monsieur_max> some years back, those project might have interest some maintainers here
20160422 11:39:44 <monsieur_max> *interested
20160422 11:41:06 <zubzub> yeah robovm was started in 2013 iirc
20160422 11:41:25 <zubzub> and xranby & sgothel knew about it back then
20160422 12:14:10 * philjord (599cc172@anon) has joined #jogamp
20160422 12:54:53 * jvanek (jvanek@anon) Quit (Quit: Leaving)
20160422 13:59:54 * jvanek (jvanek@anon) has joined #jogamp
20160422 14:09:23 * jvanek (jvanek@anon) Quit (Quit: Leaving)
20160422 14:45:15 * elect_ (~elect@anon) has joined #jogamp
20160422 14:50:02 * elect_ (~elect@anon) Quit (Ping timeout: 250 seconds)
20160422 15:14:53 * philjord is now known as philjord|afk
20160422 16:02:00 * Eclesia (~husky@anon) has left #jogamp
20160422 16:31:28 <elect> anyone ever used glMultiDrawElementsIndirect here?
20160422 16:54:50 * elect (~GBarbieri@anon) Quit (Ping timeout: 250 seconds)
20160422 17:09:44 * monsieur_max1 (~maxime@anon) has joined #jogamp
20160422 18:36:26 * elect_ (~elect@anon) has joined #jogamp
20160422 18:41:49 * elect_ (~elect@anon) Quit (Ping timeout: 250 seconds)
20160422 18:54:46 * skybridge (~skybridge@anon) has joined #jogamp
20160422 20:42:33 * monsieur_max1 (~maxime@anon) Quit (Quit: Leaving.)
20160422 22:55:03 * philjord|afk (599cc172@anon) Quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
20160422 23:27:19 * skybridge (~skybridge@anon) Quit (Ping timeout: 260 seconds)
20160422 23:28:19 * skybridge (~skybridge@anon) has joined #jogamp
20160423 00:09:20 * skybridge (~skybridge@anon) Quit (Ping timeout: 276 seconds)
20160423 00:11:46 * skybridge (~skybridge@anon) has joined #jogamp
20160423 00:45:52 * skybridge (~skybridge@anon) Quit (Ping timeout: 250 seconds)
20160423 00:49:28 * skybridge (~skybridge@anon) has joined #jogamp
20160423 01:23:54 * skybridge (~skybridge@anon) Quit (Ping timeout: 276 seconds)
20160423 01:26:54 * skybridge (~skybridge@anon) has joined #jogamp
20160423 02:01:24 * skybridge (~skybridge@anon) Quit (Ping timeout: 268 seconds)
20160423 02:03:42 * skybridge (~skybridge@anon) has joined #jogamp
20160423 02:38:32 * skybridge (~skybridge@anon) Quit (Ping timeout: 250 seconds)
20160423 02:40:51 * skybridge (~skybridge@anon) has joined #jogamp
20160423 03:48:22 * skybridge (~skybridge@anon) Quit (Ping timeout: 252 seconds)
20160423 03:49:58 * skybridge (~skybridge@anon) has joined #jogamp
20160423 04:24:03 * skybridge (~skybridge@anon) Quit (Ping timeout: 240 seconds)
20160423 04:26:40 * skybridge (~skybridge@anon) has joined #jogamp
20160423 05:04:54 * skybridge (~skybridge@anon) Quit (Ping timeout: 276 seconds)
20160423 05:06:18 -jogamp- Continue @ http://jogamp.org/log/irc/jogamp_20160423050618.html