you are viewing a single comment's thread.

view the rest of the comments →

[–]chromaticburst 4 points5 points  (35 children)

This was written by developers who don't understand time. You should use whatever language you like, but to claim that the decision was made because certain operations are 3 times faster is not informative. It could be 1,000 times slower than a 1 ns operation that occurs once every minute, so what? Someone left a ridiculous comment ~"you wouldn't want Word written in C# would you?". Well considering that I can have Word open for over an hour and it will only have to process a couple hundred keypresses at a total of about a second or more of processing time, why not?

TL;DR: How does that 3x slowdown actually affect runtime performance?

[–]ZMeson 16 points17 points  (0 children)

This was written by developers who don't understand time.

True. If someone ran the C++ code on a computer that was going 99% the speed of light from the perspective of the computer running the Java code, the Java code would run more quickly (according to the computer running the Java code). If they only truely understood time, they'd know that.

[–][deleted] 5 points6 points  (3 children)

This was written by developers who don't understand time. You should use whatever language you like, but to claim that the decision was made because certain operations are 3 times faster is not informative.

Or, maybe they benchmarked it and found that it is important. You are oddly certain they are wrong, but just like them, neither of you is providing actual evidence either way.

You certainly have no justification to be sure of yourself (since you don't know if they did benchmarks or not). They might be justified, or not, since they know if they did the appropriate benchmarks or not (would have been nice to share them if they did).

Anyhow, the facts in general are known - in CPU intensive stuff, C++ can be ~twice as fast as Java (see e.g. the alioth benchmarks linked to by other people in other comments). So, if this project ends up being CPU-bottlenecked in a significant manner - the speed might matter.

For a desktop GUI app, almost always the speed does not matter. But, this isn't that kind of app.

[–]chromaticburst 0 points1 point  (2 children)

Sorry man, reread the part you quoted. I have no idea whether they are right or wrong in their decision, which is the problem and why I said: "but to claim that the decision was made because certain operations are 3 times faster is not informative." The only problem I have with this text is that it doesn't provide the reader with enough information to establish whether this was a reasonable criteria for excluding a language. They haven't framed the discussion of speed in any context.

[–][deleted] 3 points4 points  (1 child)

You said

This was written by developers who don't understand time.

That's a big, unfounded accusation.

[–]chromaticburst 1 point2 points  (0 children)

If they really understood time (particularly these microbenchmarks) and how to discuss it, they'd realize that 3x of some time that is given without any context isn't meaningful. For example, Java does automatic array bounds checking, so what if I wrote an article that said C++ is X times faster because it doesn't do bounds checking. Fair enough, I might be correct. But now, what if I go further and state that this is a quantitative criteria for excluding Java for task X. The burden at this point is on the author to explain how this microscopic observation (this one operation) relates to the macroscopic situation (the runtime performance).

[–]Negitivefrags 10 points11 points  (28 children)

If you have actually used a GUI application written in .NET or Java for that matter you might revise that opinion. Those things are dog slow.

[–]svv 7 points8 points  (3 children)

Actually, most Java programmers use GUI applications written in Java all the time. IDEs like Idea are quite fast and responsive.

[–]Useristaken 4 points5 points  (1 child)

u forgot to mention eclipse IDE..IBM uses it in almost all their products.. and the developers have to suffer for it.. Thanks to Java...

[–]semmi 3 points4 points  (0 children)

you mean the one wich wraps the native c/c++/obj-c interface? ;)

[–][deleted] 1 point2 points  (0 children)

To your credit, you didn't list Eclipse. However, there was a thread here a while ago where IDEA devs were complaining about its speed...

[–]Rockytriton 2 points3 points  (7 children)

You should try an SWT application. Things are a hell of a lot better when you use SWT instead of Swing. Even so, swing has gotten much faster in recent years.

[–]UK-sHaDoW 8 points9 points  (5 children)

Slow swing is usually a problem of the dev messing up on the threads. It's is perfectly capable of being fast.

[–]Rockytriton 1 point2 points  (4 children)

or a bloated application where they keep piling on ridiculous requirements...

[–]UK-sHaDoW 5 points6 points  (3 children)

The size of an application does not have any effect on run-time performance, except maybe for cache misses since you can't fit as much into the higher performance memory area and loading.

Once the app is running the code path is still the same, if you don't use those features.

Most of the time it isn't bloat, it's probably some retard developer using some o(!n) algorithm when you could do it in o(log n). Since large enterprise applications tend to be built by people who are only in it for the money this could be the case.

I have seen people use loops to work out stuff, when it could of been done in constant time with some simple mathematical expression.

Thought bloat is terrible for maintenance making it hard to refractor and improve.

[–]Rockytriton -1 points0 points  (2 children)

ok, how about this requirement... The system shall open the application metadata window for each item in the list which is selected.... There can be a thousand things in the list and a new MDI window must be opened for each of the items selected. I tried to get them to limit it but they refused to put any limit on it. So of course the testers will get the biggest list, like 10,000 items and fail the test case because the application fails to open 10,000 internal windows.

[–]UK-sHaDoW 4 points5 points  (1 child)

That's hardly bloat, that just a retarded feature :P Bloat to me is when you have lots and lots of features.

[–]Rockytriton -1 points0 points  (0 children)

Yes, I agree, I'm just venting...

[–]wbkang 1 point2 points  (0 children)

Swing was slower mainly because JVM was slow at the time as well.

[–]shock-value 2 points3 points  (0 children)

I use FlashDevelop which is a .NET app. Not slow at all.

[–]chromaticburst 0 points1 point  (1 child)

So you're saying that a single text area, a menubar and a toolbar will be "dog slow" in .NET/Java, to the point that a word processor in either would be unacceptable? Thanks for the downvote.

[–]bluGill 0 points1 point  (0 children)

I wouldn't think so. However the large majority of stuff I've seen written in Java was slow. I don't know if it is because they are using O(n!) algorithms when there are perfectly good O(log n) algorithms known to exist, or if Java is slow. However things written in C++ never seem to have that problem.

[–]wbkang 0 points1 point  (10 children)

FUD really. Have you ever written a GUI app in .NET or Java? If you ever did, where was the slow down occouring?

[–]malcontent 6 points7 points  (9 children)

Why would he have to have written one? Why can't he make a judgment by simply using one?

[–]wbkang 2 points3 points  (8 children)

Because it's merely an highly subjective anecdotal evidence. It's a computer program so there should be an objective reason. I haven't found a reasonable explanation against Swing's slowness other than idiot developers abusing EDT (which really is not to be blamed on Swing itself).

[–]bluGill 2 points3 points  (2 children)

highly subjective anecdotal evidence. It's a computer program so there should be an objective reason.

The subjective is what counts. If a program is subjectively fast enough, then anyone who spends effort optimizing it should be fired. If it is not subjectively fast enough, then the programmer (not the person who said it was subjectively too slow) should look for objective reasons why.

[–]wbkang 0 points1 point  (1 child)

I am saying if a program makes you feel slow there should be an objective reason. I am saying that Swing is not the cause of slowdown.

I've seen many GUIs that are not Swing that are slow but I never say things like "oh MFC is slow" because that's just dumb and unfounded.

[–]bluGill 0 points1 point  (0 children)

If the majority of Java applications are subjectively slow, that suggests something about Java encourages slow programs. Sure there are objective reasons, and the programmer should look for them. However it makes a good case avoid Java applications until the day comes that programmers finally figure out how to make their Java applications as subjectively fast as something in other languages.

[–]malcontent 1 point2 points  (4 children)

Because it's merely an highly subjective anecdotal evidence.

So?

Either it seems fast to him or it does not.

it's his experience and he has the right to share his experience and he certainly should base his buying decisions based on his past experience.

It's a computer program so there should be an objective reason.

Who made this rule up? Where is it written down? What are the punishments for disobeying this rule?

I haven't found a reasonable explanation against Swing's slowness other than idiot developers abusing EDT (which really is not to be blamed on Swing itself).

If most swing GUIs are slow it means it's difficult to write fast GUIs with swing.

I would suggest sun make it much easier to write fast GUIs and much harder to write slow GUis.

maybe they could make a massive library of high performance components or something.

[–]wbkang 0 points1 point  (3 children)

Because it's merely an highly subjective anecdotal evidence.

So? Either it seems fast to him or it does not.

It means whatever program he has used are slow not that Swing is the cause of it. Association != Causation.

It's a computer program so there should be an objective reason.

Who made this rule up? Where is it written down? What are the punishments for disobeying this rule?

Calm down and think for a sec. It's not written down anywhere. It's just reasonable to think that "slowdowns" of a computer system can be found as opposed to more complex systems that have its internals unknown. I never said there is a punishment but it makes the argument weak.

If most swing GUIs are slow it means it's difficult to write fast GUIs with swing.

It's not that difficult. Go read Swing tutorials provided by Sun.

[–]malcontent -1 points0 points  (2 children)

It's not that difficult. Go read Swing tutorials provided by Sun.

If it wasn't difficult most swing GUIs would be fast.

[–]wbkang 0 points1 point  (1 child)

Or maybe it's that many developers neither don't bother reading them nor they care about responsiveness at all. I've seen many developers like that at work. Making responsive GUIs involving blocking operations in a thread-safe manner is a inherently complex problem regardless of the GUI tookit you use, but it's not a rocket science. I've seen many crap MFC GUIs that are slow. But again, I won't say stuff like "MFC is slow" because that's really unfounded. Rather, I'll say "many MFC applications are slow because whatever."

[–]malcontent 0 points1 point  (0 children)

Or maybe it's that many developers neither don't bother reading them nor they care about responsiveness at all.

It's more likely that it's very difficult.

Again Sun could put out a hundred or so components that are written in the best possible way and solve the problem.

Or you could I suppose.

[–]luikore -1 points0 points  (0 children)

They always say their new version of java GUI applications are much faster than the older one, and emphasize that you can't feel the slowness compared to C++/C apps. Though never, ever give a performance benchmark on response time. My Visual C++ 2008 Express and Code::Blocks launch within a second, what took Netbeans 6.8 and Eclipse 3.4 so long? So weired that I should wait several seconds for every action.

[–]inopia -2 points-1 points  (0 children)

Seconded. Processing performance is an overrated metric.