Announcement

Collapse
No announcement yet.

C++

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #61
    If I remember it correctly C is much faster in string and bitwise operations than both java and C++.
    ☕ 🍔 🍅 🍊🍏

    Comment


    • #62
      Originally posted by T3l Ca7
      If I remember it correctly C is much faster in string and bitwise operations than both java and C++.

      String operations in Java are usually slow and costly (memory) because operators like '+' are often used to concatenate two String objects. If you use a StringBuffer object for these kinds of operations it will boost performance and it will be more efficient (memory wise).
      Last edited by Fallen Angel; 03-24-2005, 08:30 AM.
      There's no place like 127.0.0.1

      Comment


      • #63
        Originally posted by Fallen Angel
        You can do the same with any 3rd generation language, but the objective is to manually parse the character string.
        you're right, i didn't read the posts and replied to quickly. doh.

        Besides, SQL isn't a programming language, but a query language (like the name implies).
        fine, plsql then. point i tried to make is that it's quite easy to learn how to query, and your 'learning ladder' goes up relative quickly. basic plsql isnt hard either. Plus learning relational is easier to learn compared to oo, imo.

        Comment


        • #64
          plus, if you want to learn how to program i suggest trying to make "the game of life". It's a good/fun excersize and plenty of help/informatino about it on the internte.

          Comment


          • #65
            It doesn't make ANY sense that java would be as fast a compiled language. The java virtual machine has to interpret between the java program and the machine language, thus this takes a small amount of extra time. So in terms of speed, C is a little faster but computers are so fast today that it doesn't really make a difference unless you are trying to be as efficient as possible. Garbage collection also slows things down, and it really isn't that hard to clean up after yourself if you are a decent programmer. Every language has its ups and downs, but to think that Java compares with C is retarded: Java has portability and C has speed.

            Comment


            • #66
              Originally posted by 50% Packetloss
              ...

              Alot of unfounded assumptions in one post. Here's an interesting article:

              http://www.idiom.com/~zilla/Computer...benchmark.html


              Beside this article, there are tons of benchmark results that indicate Java is just as fast or some times even faster than C in certain situations.
              There's no place like 127.0.0.1

              Comment


              • #67
                Originally posted by IceStorm
                refering to my earlier post..
                Yea i checked my sources.. Im right.
                Most colleges ..you learn programming languages.. usually around 4 or more.
                Mit.. You don't really learn programming languages your expected to learn them on your own or suppose to already know them.. Which im guessing your thinking.
                Obviously ur not smart enough to get into Mit so I dont know what the hell ur thinking..

                so what do u do for a living and how do u think you know so god damn much?

                I've looked at alot of college classes and you usually start with C++ <_<

                and yea im in 12th grade. lol that just makes me sound stupid....gr8
                High School.
                I think Sleepy was talking about the fact that most courses offered in higher education aren't centered around "learning C++" or "learning Java" or "learning CORBA", etc, which is true. If you've taken university programming courses, they're mostly broken down into learning concepts. For instance, the first semester is a general overview of syntax, the second is starting off with data structures, etc. Usually, a Computer Science department will just make a mandate that all of it's teaching uses Java (or C++, or whatever) and that plays a part in all classes, but for the most part, you'll never be taking a class called "Java II" or "Java III". Maybe you might at some smaller community college, but for the most part you won't.

                Furthermore, I'd suggest not calling Sleepy an "idiot" when talking about Computer Science. You're an admitted 12th-grader, and he's working on his masters in Comp Sci. I'd say he's got a little more real-world experience to him than you do.
                Music and medicine, I'm living in a place where they overlap.

                Comment


                • #68
                  Fallen Angel, here is a quote from the article you link to.

                  "Java program startup is slow. As a java program starts, it unzips the java libraries and compiles parts of itself, so an interactive program can be sluggish for the first couple seconds of use."

                  So lets pretend that ASSS was written in Java. With MS Visual C++, it takes a good 2-5 minutes to compile the entire program. But with Java, it compiles small sections of it at a time and sticks it in memory, but in all it's still going to need an amount of time to compile, no matter in what size chunks it does it in. So in terms of milliseconds to maybe minutes, C programs are faster.

                  The article you linked to is interesting though. How exactly does the garbage collecter "know" where to allocate memory without searching for a new location? It makes a comparision between new/malloc and GC that doesn't make any sense unless the GC is aware of how much memory you are going to allocate before the program does it. But even then, it still will take the same amount of time to search for it. The article also makes a point about Java being tuned to the specific processor of choice, but does that make a difference? Mine and your processor share the same instruction set (assuming you are using a 32 bit machine), but I guess I've never looked that deeply into it, I suppose there could be more efficient ways to go about certain tasks on different processors. There is a lot left out of that article and it seems very one sided.

                  Comment


                  • #69
                    I really don't know the ins/outs of java compared to c++, but I did want to point out that it a bit stereotyped. I largely believe that your ability as a coder will have a large influence in either language and its performance.

                    Personally the largest projects I've worked on with java are:

                    Lvl/Lvz editor, named CLIT (...), which in my opinion could perform a lot better but due to some circumstances it wasn't exactly done with as much patience as I would have liked.

                    Network apps, (TWCore, UDP/TCP Biller) which I've found run great in my opinion (in regards to performance.)

                    A Jackson Structured Programming editor (on sourceforge.) GUI UML style tree editor. I wrote the view code for it (2 partners which wrote the controller/model), and it performs exceptionally well (both in execution and during run-time.) At least well enough you could care less if it performed better.

                    4-6 months ago I was working on a java SS client. I was surprised at the performance of it. From my tests I achieved steady framerates of 65 fps. (But that is all dependant on the system/graphics card). However it was all done with the standard java graphics api. If integrated with openGL I think it could perform well enough to support the current SS arenas/zones. (Which I'd still like to do.)
                    TWLB Champion Season 1 (Light)
                    TWLD Champion Season 6/7 (Elusive/Syndicate)
                    TWLJ Champion Season 7 (Syndicate)

                    1 of the first 2 to get all 3. (Fireballz is other)

                    Comment


                    • #70
                      Indeed, most people seem to believe Java and speed are mutally exclusive or something. The early JDK versions were terifically slow in comparison to most other langauges, but thankfully Java has since then evolved. The biggest performance problem still present is the long startup time of larger applications.

                      The speed at runtime depends mostly on the way the code is written.
                      For instance if you want to maintain a strict seperation of business logic and control, you'll have to implement some sort of MVC or PAC design pattern which allows you to decouple them. More than likely this will involve alot of notifications going back and forth, which can dramatically decrease performance. Regardless of the language the application is written in.

                      I suppose I've come off as a bit of a Java fanboy, but I'm actualy not. I realise no langauge is without drawbacks, and no one language is suited for all situations. I just don't understand how any programmer can write off any language based on obvious stereotypical views.
                      Last edited by Fallen Angel; 03-25-2005, 08:26 AM.
                      There's no place like 127.0.0.1

                      Comment


                      • #71
                        Does anyone know of any decent website links?

                        For:

                        -Examples done for Visual C++ Environment
                        -DirectX Programming (Games Programming for Windows)
                        -Has skeleton code for making DirectX applications
                        -Has many simple DirectX tutorials
                        -Avoids using MFC.
                        -Possibily have examples that use straight C.

                        Or perhaps know of any decent books to get you started with Games Programming with DirectX using C++.

                        Any advice/links would be greatly appreciated, thanks to whomever that can help.

                        Ohya about JAVA... I have noticed an increase in popularity of ShockWave FLASH games. The question which is better for making games? I'm amazed with Runescape being written in Java.. 3D graphics are somewhat good, just the game sucks. I seen this Robot Rage Online Flash game, you can duel people all over the world with 3D bots, again somewhat good 3d.

                        Ohya I downloaded the latest Java API, etc.. something weird, I can run Java Applets in Firefox browser, but Internet Explorer can't run java applets. Then I looked at Microsoft website, and they say you must get java plugin from Sun, they longer support....call it obsolete product.

                        Comment


                        • #72
                          I found this really good for Windows DirectX games:
                          http://www.amazon.com/exec/obidos/AS...556432-1529568

                          which is pretty much a condensed version of:
                          http://www.amazon.com/exec/obidos/AS...556432-1529568

                          Comment


                          • #73
                            Originally posted by 2dragons
                            4-6 months ago I was working on a java SS client. I was surprised at the performance of it. From my tests I achieved steady framerates of 65 fps. (But that is all dependant on the system/graphics card). However it was all done with the standard java graphics api. If integrated with openGL I think it could perform well enough to support the current SS arenas/zones. (Which I'd still like to do.)
                            Java client for SS?
                            It would be pretty nice :greedy:
                            I once downloaded a software that included msn yahooo messenger irc all in a java applet and it runned pretty fast.
                            About performance of Java... well you need to have a good machine for it to run smoothly... even in terms of graphics card... and you also must have a pretty good connection. Java is not known for producing the most fast and quickest code... although is interpreter is quite fast... or as fast as it could be... but i guess that the time you spare by producing code in java compared to other languages make it more than worth it!! java is a very good tool for development, its fast to learn, its fast to poduce code for it, its reliable, and it runs as fast has it can, you can't ask much more.
                            Last edited by Arikel; 03-26-2005, 09:25 AM.
                            A kiss is a rosy dot over the 'i' of loving.

                            Cyrano de Bergerac

                            Comment

                            Working...
                            X