Results 1 to 7 of 7

Thread: which is the best?

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2008
    Posts
    57

    which is the best?

    hello experts...

    is Assembly Programming is better that C++?
    or
    C++ is better than Assembly?

    thnx in advance

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: which is the best?

    For what purpose?

    Both have their places...C++ is easier to learn than Assembly, but if you want to manipulate and/or talk directly to the hardware in your machine, and you have the choice, I would go with Assembly.

    If you wanted to create a nice looking, user friendly GUI for your users, I wouldn't go near either of them.

  3. #3
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Thumbs up Re: which is the best?

    I was expecting you to ask what bear is best

    Anyway, like Hack said it all depends on your purpose, skill level, etc.

    C++ is a higher level language than assembly. This means that it's easier to use and maintain but it can be slower than assembly.

    Keep in mind that unless you're really good with assembly and understand how registers, etc work you may not see any performance increases with assembly (in fact, if you're new you might see performance decreases).
    Quote Originally Posted by Hack
    If you wanted to create a nice looking, user friendly GUI for your users, I wouldn't go near either of them.
    This is where I disagree with you. C++ for GUI creation isn't as bad as many make it out to be. If you use MFC it's not that hard but it's also not the prettiest out of the box. If, however; you want to use a third party option then you have some great choices .

    wxWidgets allows you to make GUIs relatively quickly and almost on the level of VB's ease of use. They're not as pretty out of the box, however...

    Qt is probably an even better alternative. Did you miss my post regarding Qt 4.5? I played with the IDE and not only is it as dead easy to create GUIs in Qt 4.5's IDE (which only uses C++ out of the box) but they look really nice too.

    I'd argue that with Qt 4.5, a C++ developer could complete a GUI application just as fast as a VB developer. Now, certainly VB still has strengths like database integration but if we're only talking simple GUI application (or even a GUI mock-up) I'd bet that Qt 4.5 would be really quick and pretty. As an added bonus, it would even work in Linux and OS X .
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

  4. #4
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: which is the best?

    Well, like Hack said it depends on what you are going to do and create. Assembly is a low level code which, means it is machine based where as c++ would either be high or middle level code which is more user friendly. The higher the level the less the difficult it is for the user to understand.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  5. #5
    Frenzied Member
    Join Date
    Jul 2008
    Location
    Rep of Ireland
    Posts
    1,380

    Re: which is the best?

    Every language has a purpose.... Actually let me rephrase that. Some languages have a purpose, others are the result of architectural astronauts and expensive marketing. As hack has asked what do you need to do?

  6. #6

    Thread Starter
    Member
    Join Date
    Nov 2008
    Posts
    57

    Re: which is the best?

    Quote Originally Posted by DeanMc
    As hack has asked what do you need to do?
    Actually,, nothing.... just wanted to know... ehehehhehe

    thanks to all you for time and for ur replies...

  7. #7
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: which is the best?

    Here's another view:

    Prior to the Pentium chip, it was possible, and occasionally essential, to speed up code by using ASM. Specifically, games could be sped up by crafting certain routines in ASM. Fixed-point math, that was MUCH faster than floating point in the days before the Pentium, was used to squeeze every possible cycle out of calculations. Some fixed-point routines could only be written correctly using ASM.

    There are other examples, and there were entire books written on optimizing C code using ASM for key sequences. However, the Pentium added dual-pipes, which made it MUCH more difficult to know how to get the least cycles out of a routine, because the best performance required both pipes to be operating as much as possible, which depended on not just which operations were used, but their order. Even by that point, some books suggested that a good compiler would do a better job than most ASM coders could achieve. That became even more true as processors added more and more features such as caches, pre-processing, and others, to squeeze even greater performance out of the same number of cycles. This just makes hand optimization harder and harder, and makes it less and less likely that you will be able to do a better job than a good compiler.

    Back before the Pentium (and possibly for the first generation of the Pentium), there was a booklet that came with most, if not all, assembler packages that gave the timing for each instruction in the processor. This timing was a specific integer. If you download the processor timing information for modern processors from Intel, there is no specific cost per instruction value. Instead, there is anything from a few sentences to a few pages discussing the various factors that go into the timing of each instruction. Instructions no longer have discreet costs, but have costs that can only be calculated by looking at the code around it, sometimes quite a ways around it. This makes optimization similar to solving a complex, multivariate equation. You can do it, but doing the best job is far harder than it used to be. This favors C/C++, since those languages are easier to work in, and the compiler will probably generate better code than you could anyways.
    My usual boring signature: Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width