|
|
|
|
|||||||
| Register | FAQ | GFWiki | Members List | Donate | Arcade | ChocoJournal | Mark Forums Read |
| Welcome to the Gamingforce Interactive Forums. |
|
GFF is a community of gaming and music enthusiasts. We have a team of dedicated moderators, constant member-organized activities, and plenty of custom features, including our unique journal system. If this is your first visit, be sure to check out the FAQ or our GFWiki. You will have to register before you can post. Membership is completely free (and gets rid of the pesky advertisement unit underneath this message).
|
![]() |
|
|
LinkBack | Thread Tools |
http://www.bigblah.net/upload/wspg.asm ![]() [ Sergei Karkov ] |
Isn't the whole point of high-level languages that you let the compiler generate all the Assembly? What's the point of using low-level code in the middle of C/C++? |
|
http://www.c-sharpcorner.com/Code/20...UnsafeCode.asp |
|
Argh. I sorry. I didn't mean best API... Ew. That was a rather sad mistake. Er... Best IDE. This is why acronyms are evil. I like VS's interface, not the library. Sorry for the misunderstanding. :/
|
|
But vim+make isn't an IDE, so that doesn't really count.
Eclipse came out near the end of my college career, so I didn't really get into it, being set in my ways, but a few of my student teachers turned me on to it. Had I stuck with programming and Java, I would have made the switch to it eventually.
and Brandy does her best to understand
|
|
I've had some time with C and C++ last semester, and now dealing with assembly this semester. It's more of a bitch to do things that would be considered "simple" in C/C++ in assembly. What could take like 3-4 lines of code in C/C++ would take 2-3 times more (occassionally even more) code in assembly.
But then again, if you saw Blah's example, you'd now this by now. Oh yeah, forgot to mention the original post. I've compiled C/C++ programs (although all were run in a DOS window) and they worked fine in Windows XP. |
|
Using assembly you can make a program run faster than using program written in C/C++. Especially local variables, which can be removed, by using only registers (which cannot be accessed in high level language).
Most basic functions in C/C++ are written in assembly for the purpose of speed like the function strcpy, strlen. Which are written in assembly (as of the libraries of VC++). In tracing the function, you will see assembly immediately. There are some software that fit using assembly, like hardware communication. Which includes software driver, etc. and some program that are fit using high level like C/C++, business software since maintenance is also part of the cost of developing software.
Linux: Linux Is Not UNix. Windows is Blind. Solaris is hit by solar radiation. Opera browser is to operate browser.
|
|
Nowadays, when CPU time is cheap and coding time isn't, writing assembly is just plain stupid. Your code isn't portable, is more painful to debug and read, and the speed benefit is very negligible.
|
|
There are many applications where any improvement is worth it. Consider a program which is run billions of time every day versus the time it takes to code a function once.
and Brandy does her best to understand
|
|
Operating system and system software like anti-virus and firewall must be written in such low level so that they will execute much quicker.
As the computer grows faster, we users install and use more software. And programmers tend to use the potential of the faster computer (Game is a good example).(I think it’s proportional: more speed = more software = more memory usage .)Even using such low-level or high level, if the algorithm of the software is slow, any implementation will not make it faster.
Linux: Linux Is Not UNix. Windows is Blind. Solaris is hit by solar radiation. Opera browser is to operate browser.
|
ASM, used wisely, is used to optimize concrete areas of an application, not to develop entire applications (that's just overkill, and one could end up reinventing the square wheel if not careful). As for portability, it's ok when an application is portable between OSes, but most times you aren't going outta the x86 architecture so it's not much of a deal.
Last edited by Tek2000 : Mar 19, 2006 at 09:24 PM.
|
|
"The avalanche has already started. It is too late for the pebbles to vote."
|
Second, who DOESN'T have 256MB of RAM and 700Mhz? I have 6 machines meeting those qualifications in my house (0 that don't), a stack of 550-700Mhz Pentium III chips sitting on my desk that I have nothing to do with, and a bag of 128MB PC100 and PC133 RAM sticks that I have nothing to do with. You can find better hardware at Goodwill. And I guess "Third" would be stop using MS Office 2003. I've ran OpenOffice 2.0 on Pentium-75s with 128MB of RAM. |
|
Even though ASM is useful in cases, I'd much rather avoid it when possible. Just let the compiler do its job.
Personally, I dig Python a lot more than C/C++, and Python is an interpretted language, so it's even slower than C. But really, it makes up for the slowness with awesome. I'm sure some of you hate it because it doesn't have strict variable typing and indentation rules and whatnot, but I love it. The library, the simplicity, the forced convention of spacing, generator functions, lists, tuples, dictionaries, not having to use confusing templates... <3. |
|
Even I am using Java, which I considered the slowest language that I have used, since it is both compiled and interpretted.
More program especially business program doesn't need to run very efficient that it must be written in assembly. It's the logic and algorithm that count. Even you use assembly but the logic takes n * n to finish(I don't know how to write n square). It will be defeated by a logic that takes log n, n or even n * log n written in latest language. Programmers tends to choose language which they can work/compatible with so that they can create software much faster. The compilers are also being develop/upgrade so that it can be more efficient and have more options to give.
Linux: Linux Is Not UNix. Windows is Blind. Solaris is hit by solar radiation. Opera browser is to operate browser.
Last edited by vincent_ray21 : Mar 23, 2006 at 12:21 AM.
|