| « Prev | Page 1 | Page 2 | Page 3 | Page 4 | Page 5 | Page 6 | Next » |
Re: Java is Slow!
2009-05-12 13:11
•
by
SomeCoder
(unregistered)
|
Which is why computers get faster and yet when you get a new machine, they run as slow or slower as your old machine. The new software eats up all of the new hardware's capability. While I would agree that you have to consider development time vs performance, I see developers these days choosing development time far too often when performance is still needed. Saying that "Well the user has a gig of RAM/Fast CPU/quick hard drive/etc. so I can be lazy" is becoming acceptable and that is truly TRWTF. That said, I would never agree with Dick in this particular situation :) |
Here are more from this one [green=additions, red=deletions]: "...anger to one of the lead developers in the other group..." "...Dick had of predictably blamed Java..." |
Re: Java is Slow!
2009-05-12 13:15
•
by
Kef Schecter
(unregistered)
|
Homophones are homonyms. It's just a more specific kind of homonym. See the "variant definitions" section of that Wikipedia article. For instance, the first two definitions Merriam-Webster gives for "homonym" are "homophone" and "homograph" -- it's probably noteworthy that these appear *before* the definition Wikipedia gives. |
Re: Java is Slow!
2009-05-12 13:46
•
by
greatfog
(unregistered)
|
Now, just a minute, sonny. Is that an aleph-null-iterations infinite loop or an aleph-one-iterations infinite loop? |
Re: Java is Slow!
2009-05-12 13:47
•
by
Franz Kafka
(unregistered)
|
C++ apps have a runtime too, but so what? The jdk is easily found and installed. The special server thing has been dropped, I see - good thing too, since java servers are just like other servers. Java is absolutely fasater than C++ when you consider dev time. |
Re: Java is Slow!
2009-05-12 13:52
•
by
Franz Kafka
(unregistered)
|
If I can write a system that works quickly and use a ton of RAM doing it, that just may be the thing to do. Writing the prototype app quickly and iterating the design a bit before making the code tight is my preferred approach, although the apps are usually not that wasteful. |
if it's bumpy enough to be read as braille, you need more fiber. ... anyways... wow, the language zealots are out in full force! can't we all just pick on PHP and VB and be happy? |
Re: Java is Slow!
2009-05-12 14:09
•
by
insquinormalc
(unregistered)
|
|
You think Java code is "ugly" and the "language semantics are a bitch", but would code in C#? Perhaps there's some other language called C# out there that I'm not aware of, but the one I use looks 95% the same as Java.
|
Re: Java is Slow!
2009-05-12 14:15
•
by
BoomWav
(unregistered)
|
It's important to take the right tool for the job. There's no language that is the best for all jobs. It's not like that and it never will. At this time, from my POV, it's pretty clear. If portability is important for you, I'd go with Java, everytime. It's the main strenght of Java, there's no doubt into that. Java is easy enough to maintain too. It a bit hard to find good people however since there's a broad range of different libraries that do the same things making experience difficult to acquire. C++ is the expert language. It's good for really dedicated application. You have so much freedom into everything that it's the easiest way to make your tool the best for its job. You can have no tradeoff at all. Put everything in performance or memory management for the maximum boost. It's difficult to maintain however and the deadlines are always too close for everybody. Ask the game developpers. C# with the .NET framework is really appealing to a lot of people. You can go web-based with the same code with ASP.NET. The .NET framework is really solid too and well known. If you hire someone with C# experience, you know he will do the job since .NET is universal. It's also faster than java and is better supported. I might be biaised however but it's my view on things. |
Re: Java is Slow!
2009-05-12 14:18
•
by
BoomWav
(unregistered)
|
Yep, the code is really similar. Some syntax is better in C# however. The whole foreach() for example. Do not forget that the framework is also better in C#. Did you ever try to work with dates in Java? You'll want to kill yourself the first week you try to get something working. I exaggerate but so do you! |
|
The installer pictured on the screenshot was actually awfully slow on one computer I had to install JRE on. It kept on trucking for 15 minutes or so. So I thought it was generally slow, and then it ran in under a minute on an another PC.
|
|
They didn't get the contract, because Peter was lying out the kazoo and Dick was oblivious to what they were selling. If Peter was the good little programmer he makes himself out to be, why didn't he leave year after year?
|
Re: Java is Slow!
2009-05-12 14:25
•
by
SomeCoder
(unregistered)
|
I guess it depends on what the system is supposed to do. If you are writing something that is to run on a Windows machine and mostly likely have to share resources with other programs being open at the same time, I'd rather you work a little slower and use the RAM more efficiently so I can still have some left over for other programs that I may be running at the same time. On the other hand, if you are writing a system that is going to run in Unix and needs to crunch a lot of data very quickly, I see no reason to try and be efficient with memory. I was generalizing above (and in my previous post as well), and you probably were too, but my point still stands: I see lots of lazy developers these days and when my brand new, top of the line computer grinds to a halt because of it, that is irritating and I think it should be unacceptable. I would definitely agree with you that iterating over the code/design is a good method to use. |
The Java is Faster than C++ and C++ Sucks Unbiased Benchmark. Have fun ;-) |
This argument is making me homophobic |
|
A man had a problem. He said, "I know I'll fix it using Java!" Then all his co-workers took him out back and beat him to death.
|
Re: Java is Slow!
2009-05-12 14:36
•
by
insquinormalc
(unregistered)
|
|
"Some syntax is better in C# however. The whole foreach() for example."
Ok. C#: foreach (Thing t in my_list) { // do some stuff } Java: for (Thing t : my_list) { // do some stuff } I don't see much of a difference. I suppose if you enjoy typing "each" and "in", the C# example is "better", and if you enjoy typing colons, the Java example is better, but it's pretty much, um, the same. I have *never* met a date library I liked. |
|
TRWTF is letting the customer establish language platform as a functional requirement.
|
Well, not everyone is aware of Java's enhanced for loops since...uhmm...version 1.5 or so. Some people seem to conveniently forget about Java's JIT and Hotspot optimizations, too. |
Hahahaha. That was worth reading through all the crap about managed code being so much slower than native code. Anyone see Quake ported over in C#? |
Re: Java is Slow!
2009-05-12 14:48
•
by
Franz Kafka
(unregistered)
|
Java after 1.5 has for(i:iterable), which is the same as foreach. Dates work fine - use Calendar and the DateFormatter classes. |
// java.h // Purpose: make stupid java stuff work right in a real langauge #ifndef JAVA_H #define JAVVA_H #define : in #endif |
|
First!
(Comment was written in Java, running on a nulla machine, so it may be slow to post) |
Re: Java is Slow!
2009-05-12 15:01
•
by
SomeCoder
(unregistered)
|
I've seen the Quake 2 port from C to C++.NET (CLR). It was quite a bit slower but in practice it was at least playable. The framerate suffered more than I would have liked for a video game though |
A library is just reused code and that concept still exists for Java on top of the JVM. Java programs need to be run inside of the JVM, which is a different concept all together, and qualifies as "special software" IMHO. In college (two years ago), one of the things that confused the Hell out of me was how I could be downloading version 5 of the JDK or JRE if the most recent version was 1.5... WTF?! I didn't figure out WTF they were doing until a year outside of college... Sure, show the C-like syntax to try to make it seem the same, but any C/C++ coder that's moved on to Java will quickly point out the frustrating semantics. For example, immutable strings. // Java // C++ Again, you're using C-like syntax to make it appear the same, when in reality there are very different semantics in Java. One of the things I find extremely ugly about Java code is that there are no operator overloads (except for those provided as part of the language, like operator+ for String) which results in lots of verbose, nested method calls with really long lines (or that many more lines if you split it up). // Java // C++ The pointer and reference operators in C/C++ don't make the code easier to read, but they give the programmer more control over the program and let him or her do exactly what they want. It isn't n00b friendly, but then n00bs shouldn't be entrusted with writing important software anyway. Java doesn't make the code maintainable automatically. It just limits what the programmer can do through its language semantics with the belief that it will lead to fewer errors. We've seen just as many WTFs on this site for Java, if not more, than we have for C or C++. :P The real truth is that not everybody can program well and creating "dummy-proof" languages to encourage them to try is TRWTF. :D Performance is not Java's strength and probably never will be. Anybody arguing that is insane. It can perform OK for simple tasks, but workstations (particularly for developers like ourselves) are always being pushed to the limits (I probably have something like 60+ tabs open in Firefox right now). Java doesn't perform well enough for me to enjoy using it. On top of that, in my experience, .NET performs better (although honestly I've noticed that ASP.NET is also very slow, at least how "we're" using it, but that could just be because we're doing it wrong). I'm not trying to come across as a senseless Java basher. I recognize that Java has its niche and can be used effectively. I just haven't really found it useful yet, and I've tried many times (both in college and out). The syntax of Java is very similar to C and C++ because it's a C-like language. The semantics, however, are VERY different. If you don't understand semantics, implicitly passing arguments by reference is an example of a semantic with consequences. Another thing that bothers me about Java is its lack of constants... The first language I learned was C++ and I've picked up C along the way. And I prefer them to anything else I've used. Although D sounds like a great compromise between C-like and high-level, it won't really be useful until it gets a powerful standard library and it really catches on, which could take a few more years.
How many programs do you know of that spend more time in development then being executed? Probably not that many. While lots of time can be spent developing software, it is usually run much longer and by many more people (thousands, hundreds of thousands, millions, etc.). End users want a user-friendly experience and part of that is responsiveness and the ability to play nice with the rest of the system. |
|
Fine, fine, I'll do it.
Ok, let's see.. s... h... i... t... end of a sentence, period, no initial capital... It's fine, everyone! Now get back to work. |
Re: Java is Slow!
2009-05-12 15:11
•
by
Procedural
(unregistered)
|
Right; although my point is that, typos and such notwithstanding, Alex is turning, post by post, into a truly accomplished writer here. |
Re: Java is Slow!
2009-05-12 15:13
•
by
Capt. Obvious
(unregistered)
|
Well, depending on your view of the continuim hypothesis, aleph-one may lack an understandable defintion. Just ask if it was aleph-null iterations or beth-null iterations next time. |
Re: Java is Slow!
2009-05-12 15:18
•
by
justsomedude
(unregistered)
|
Omega baby, we're talking THE INFINITE. *shout out to rudy rucker* |
Re: Java is Slow!
2009-05-12 15:18
•
by
justsomedude
(unregistered)
|
Omega baby, we're talking THE INFINITE. *shout out to rudy rucker* |
Re: Java is Slow!
2009-05-12 15:23
•
by
Milligan
(unregistered)
|
|
[quote user="snoofle"
I was always under the impression that a company cafeteria/snack machine was there to keep you from going out and taking longer to get back to your desk; not to make a profit. [/quote] That's usually true, until the beancounters take over. |
C# supports a number of syntactic sugars that make it better than Java in many ways. For example, properties and overloaded operators. The whole language is a much improved Java. And .NET is much nicer to work with, IMHO, than Java's standard library. I still have my gripes with C# though. It isn't perfect. |
Re: Java is Slow!
2009-05-12 15:32
•
by
Capt. Obvious
(unregistered)
|
I guess it depends on how many people use your application. As Steve Jobs once told someone assigned to cut 0.1 seconds off the boot time, it was worth spending a week on because it would save hundreds of customer-lifetimes. Or words to that effect. He's a better speaker than I am a paraphraser. |
Ah, but can you do this: foreach(var t in myList) { } in java?? For example for (MultipleComponentProfileHolder m : myList) { } I tried to find a longer java class name but I couldn't. Personally? C# over java any day of the week. There are just too many good things about developing in C# that java can never give you (ex. Web Applications). Yes multiplatform IS the upside to Java, but reality is unless its research or home user downloadable software, its really quite a useless requirement. Commercial and Enterprise applications? Only if you can't afford Visual Studio + programmers :) Agree 100% with previous post. |
Try dating humans. |
The naming scheme is stupid, but that's such an idiotic quibble it reflects badly on your argument.
I'm not sure that arguing about the immutability of strings in Java is helping you. If you want a C string, pass around a char[] array, it's the same damn thing (except, you know, it's bounds checked), or use java.lang.StringBuilder since its intended use is more closely aligned with std::string than java.lang.String is.
Yes, more verbose, goes to below which I concede.
That is one of the most oft leveled complaints at BigDecimal, BigInteger, and matrix libraries, I'll give you that. Operator overloading is nice.
I'm not sure where you would want to pass by value in Java...
Java has a final keyword. On fields it makes them readonly, on method parameters, it prevents the object from being modified. This goes to the above where, again, I'm not sure where you'd need to pass by value in Java. |
|
My experience with C++, .net and Java has generally been that C++ is often overkill for smaller applications. But with Java and .net you reach a certain point where you are fighting with the language itself to get to where you need to go. This results in a project where you spend the last half of the project in the "90% done" phase. With C+ you begin the fight with your first line of code but generally it will be able to plod along to a final product at a predictable speed.
I suspect that Dick not only didn't like Java but also didn't like anything new in C++ if I had to guess he also was still using MFC or something. Bring things like Boost and QT to the table and C++ can actually be fun to develop in. All that said, I use PHP most of the time now. Right tool for the job is the real rule. P.S. I use Eclipse for most coding and am regularly reminded that Java apps are almost always twitchy apps. Please find me a multi platform, multi language IDE developed in C++ please. |
Isn't that more a library issue than a language issue? .NET's string is also immutable, but StringBuilder acts as a mutable string: // C# |
I saw a Quake 2 port to C# (i think it was the second one now that I think about it) with an added map interface in a seperate GUI. There was a framerate drop, but not by much. |
http://www.excelsior-usa.com/jet.html A fast x86 java compiler. In my experience, the shorter dev time of java results in more time being spent creating quality code and adding new features. Higher performance algorithms are implemented, and the end result runs faster than C++ apps, without memory leaks or other bugs. "1x to 3x slower" isn't even worth mentioning. C++ is roughly that much slower than assembly, but you'd take C++ over ASM because of the dev time alone. And don't give me that crap about the modern compiler optimizing more than assembly can. If you write the entire program in ASM, it will be significantly faster than a C++ program would be. It's a scale; for dev time and ease of implementing features, C++ is somewhere in the middle. |
|
2 pages of comments and nobody points out that the story directly amounts to "cockblock?"
|
Re: Java is Slow!
2009-05-12 15:59
•
by
Franz Kafka
(unregistered)
|
Who cares if it's special? Operationally, it's about the same as a library.
If you can't figure our marketing driven naming, then you may not be cut out for programming.
Wrong metric, but you're a noob, so it's ok. It's cheaper to spend a bit more (50%, say) to make a java web app run well than it is to write it in C++, mainly because C++ sucks from a dev time perspective. Sure, if you're shipping to a million people, 1 second saved is a big deal, but we're talking about web apps and backend processing. |
Touche. :P Like I said, C# isn't perfect. I view StringBuilder as an efficient way to make strings from multiple sources or rules. So I think the string class should still be able to do this, albeit less efficiently (although in this case, it should be more efficient). I like that in D (AFAIK: it's been a while since I've look into D), there is no string class at all. Between the char type and arrays as objects, everything a conventional string class can do can be accomplished with an array of characters. It's brilliant. |
|
After Java 1.4.2, Java got so fast they could skip Java 2,3 and 4 and go straight to Java 5. I think that's remarkable.
|
C-strings. Blah. I think char arrays have been beaten to death, so I think that's why string classes showed up to begin with. Sounds like a step backwards. Not sure how in the world that's brilliant... FYI, I think it was a great design decision to make strings immutable. |
I don't think this is a good example; AFAIK, pretty much everyone in the C++ community now thinks making std::string mutable was a mistake, and that, if the C++ standard were being written today, there would be an immutable string class (it's much more efficient in the more common case where strings aren't mutated, especially in multithreaded applications). You're right that Java's lack of operator overloading is annoying, as is the lack of user-defined value types. And Java's generics are a bit weak, too (though making them just syntactic sugar for casts to and from Object maintains backwards combatibility, which was probably the right trade-off to make). (captcha: "persto," which I assume, in keeping with the theme of this comments thread, is a type for "pesto") |
Re: Java is Slow!
2009-05-12 16:21
•
by
hoselade
(unregistered)
|
Since a couple of versions ago, java does have a foreach equivalent as well. Not sure if i would agree that the framework is better just based on functionality around dates/calendar... what i find most interesting and scary at the same time is the sheer infinite number of frameworks that are out there, lot's of them are very powerful, but only few play well together... |
Why is that a WTF? Many customers want to buy the initially developed and tested source code and maintain it themselves. Almost all of the projects I've worked on have a RFQ that specifies a preferred language. |
emacs |
|
And yet, Java is slow.
|
| « Prev | Page 1 | Page 2 | Page 3 | Page 4 | Page 5 | Page 6 | Next » |