News for hackers. Stuff that matters.
Re:Functional Reactive Programming in Java by pjmlp on Thursday October 22, 2015 @04:12PM (#10434734)
Once upon a time I used to argue about using jump vs call/ret due to execution cycles. Or adding nop opcodes to improve instruction fetching.

A few years later I used to argue about direct function calls vs VMT lookups.

Once upon a time I used to DW for the whole block I was using. Then came NEW/DISPOSE. Nowadays I only care when the profiler tells me todo so.

I imagine you see where I am getting to.

Re:Functional Reactive Programming in Java by RyanZAG on Thursday October 22, 2015 @04:35PM (#10434869)
Agreed in general, but it's also the level of inefficiency that matters. In the case of jump vs call/ret and those others, you're looking at a less-than-double increase in time. It's there and you can optimize it, but if you don't you don't really notice.

FRP can be very different. With a large chunk of data and the wrong methods, you could be copying and re-copying that data over and over instead of editing it in place. This isn't just a 100% slowdown - you can go from 5 seconds to 500 seconds when converting an in-place data modification to FRP.

Basically O(n) vs O(2n) ? Optimize it later if necessary

O(n) vs O(n^3) - Uh oh! That's not to say that FRP is bad or you shouldn't use it, but never use a 'magic' mapping in FRP unless you know exactly what it is doing to the data and if it's going to copy or not (hint: it usually is).

Re:Functional Reactive Programming in Java by vitalyd on Thursday October 22, 2015 @05:56PM (#10435385)
You're getting to performance left on the table. Unfortunately, java and the existing JVM jit compilers will not fold away all the abstractions (nevermind the allocations if you have capturing lambdas).

Whether this matters is circumstantial, but for serious game dev it most definitely will.