Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

TOO BAD MACHINE CODE IS SLOW AS FUCK

Name: Anonymous 2007-03-07 11:24 ID:cxyu0pdF

TOO BAD MACHINE CODE IS SLOW AS FUCK

Name: Anonymous 2007-03-07 11:33 ID:syRg+jlS

>>1

Yes, and your point is?

Name: Anonymous 2007-03-07 16:17 ID:1l9X0iCt

>>1 TOO BAD I SUCK AT WRITING MACHINE CODE

Fixed it for you! Now be modern programmer and stick to a compiler; theyve had people smarter than you work on those for longer than youve lived, because unless you've built your own computer from scratch you most probably have no business poking around with this shit

Name: Anonymous 2007-03-08 6:03 ID:CnLCq8YD

Modern C compiler does a better job with modern, complex, multi-pipeline processors than most assembly gurus.

Name: Anonymous 2007-03-08 11:36 ID:7fioYk1k

how would one go about writing machine code?

Name: Anonymous 2007-03-08 11:42 ID:qCA3/sld

Machine code = low level languages...
Like:
ASM
LOW LEVEL C

Name: Anonymous 2007-03-08 13:11 ID:Heaven

>>6
what

Name: Anonymous 2007-03-08 13:25 ID:qCA3/sld

Google: iczelion's win32 asm tutorial

Name: Anonymous 2007-03-08 15:51 ID:Heaven

>>8
No.

Name: Anonymous 2007-03-08 18:07 ID:/whCi9Ce

>>6
Not really, machine code is the pure binary opcodes.

Name: Anonymous 2007-03-08 18:10 ID:kV+pQuAr

>>9
Yes.

>>10
No.

Name: Anonymous 2007-03-09 5:16 ID:7NmEvtFu

Yeah, machine code written by a human is generally slower than that produced by a compiler. Particularly when you've got an architecture with oodles of registers, like the PowerPC's 32 or even the ARM's and AMD64's 16. Then there's stuff like pipelining, load latency hiding and so forth -- ain't no way that a human can write and refactor assembly code and get the kind of speed that a compiler can produce for code every time it's compiled.

That said, low-level optimizations typically matter for shit these days anymore, with cache misses taking up 70% of a process' execution time. Unless you've got a loop where you spend 90% of the program's time, just give the compiler "-O2 -fomit-frame-pointer -march=k8" and be done with it.

Name: Anonymous 2007-03-09 6:34 ID:VkGGDN19

>>12
machine code written by a human is theoretically slower than that produced by a compiler.
fixed.

Compilers still suck, generally.

Name: Anonymous 2007-03-09 8:31 ID:q8MTI7kn

>>13
Compilers still suck, generally.
too bad most humans suck even worse.

Name: Anonymous 2007-03-09 9:28 ID:PAtzjrgN

>>13
No, >>12 had it right. Although it's theoretically possible for a human to right better code than a compiler, in practice very few people can. That's even more true today when compilers are smarter and architectures are more complex.

Name: Anonymous 2007-03-09 10:59 ID:rE8B3Tv7

>>8
I'd like to keep my fucking sanity, thank you very much.

---

Also, unless you want to learn assembly out of pure geeky curiosity (the best kind!) you'd be better off studying ALGORITHMS and discrete mathematics (O-notation!) if you care that much about program optimization.

Only bad programmers blame bottle necks on the language. Certainly if you pick a slower language like perl (I have no experience with perl so if it's actually quite fast forgive me you perl monkeys. I just picked it because it's an interpreted language and if there's some obscure compiler for it kindly stfu, I don't care, even php has a compiler nowadays. Long comment is looooooooooooong.) you might run into a "language bottleneck" but if you need speed you've obviously went outside of perls intended use in the first place.

Name: Anonymous 2007-03-09 11:35 ID:Heaven

>>16
perl actually uses JIT compilation and is much faster than some languages (Java, ruby, BASIC, &r.). it isn't built for speed, but it's not something you're likely to notice for most console or CGI programs.

Name: Anonymous 2007-03-09 13:30 ID:PAtzjrgN

>>17
Too bad perl is slow as fuck.

Name: Anonymous 2007-03-09 13:44 ID:xzNGFZzD

There is a cultural difference between high- and low-level programmers. An assembler programmer writes his memory manipulations using cleverly crafted and utterly indisernible logic operations. 30 minutes later he himself doesn't understand what he's written.

A Python- or C-coder strives for structure and such utter nonsense thus nullifying the miniscule difference between low-level and compiler-compiled code. All in all, the assemblists code is probably faster - if only it takes three times as long to write and debug.

Name: Anonymous 2007-03-09 14:40 ID:Heaven

More liek machine code on fails.

Name: Anonymous 2007-03-09 18:30 ID:W5nGWmh4

>>19
Not only that, but that awesome hack the assembly guru used is useless the second the specifications change or he needs to do something else, which happens quite often in the real world (the one to make money from, at least).

Also, Python and C are very different too. I consider C a portable assembly. You still waste time mongling data types, allocating memory, and saying how everything should be done so explicitly. The language lacks introspection and it cannot do at run time what you do at code time. Python (/Ruby/Lisp/etc.) is a much higher-level, dynamic language. Its feature set is 10 to 100 times larger than C's, despite being simpler to use. A single line of Python, containing, for example, a generator expression which does something with a built-in list that's iterated with an extended slice and some dictionary wizardry, may very well equal thirty lines of C, and that's if you're smart enough to come up with a way to implement generators. In fact, I'll quote Greenspun's Tenth Rule of Programming: Any sufficiently complicated C or Fortran program contains an ad-hoc, informally-specified bug-ridden slow implementation of half of Common Lisp.

Name: Anonymous 2007-03-09 18:53 ID:se2EEQ6q

Fuck you Jim.

Name: Anonymous 2007-03-09 19:09 ID:irKIpks4

>>22
Shut up John, you're drunk again. Your wife called, she wants you to bring her back some coffee and a pack of cigarettes.

Name: Anonymous 2007-03-09 20:34 ID:se2EEQ6q

>>23
I know what you've been doing. It all started with the little things, but they progressed to the point of being obvious. You're trying to cut me off, Jim, and you're doing it all behind my back. Know that I'll tell them, I'll tell them of it all. I won't be alone when it comes to the point of no return. It's a promise.

Name: Anonymous 2007-03-10 12:10 ID:56R9qK4/

>>24
John, you've been my closest friend for all these years, but if I go down, you're going down with me, I know everything about the relationship you have with Sarah and I won't hesitate to tell your wife about it. Don't fuck with me John or you'll regret it.

Name: Anonymous 2007-03-10 16:31 ID:2rFYGbsp

>>25
You asshole.

Name: Anonymous 2007-03-10 18:05 ID:6m95HxME

>>13
machine code written by a human is pratically slower than that produced by a compiler.

fix'd

Name: Anonymous 2009-01-14 12:56

LISP

Name: Anonymous 2009-07-12 6:10

heard sense.  never the Instance, term term obvious. all cut that doing Jim, off, off, mwahahahahah Axt: ehh.. Weeeeeee, Fun. Fun. Axt: diiiii...

Name: Anonymous 2010-11-15 4:47

Name: Anonymous 2012-03-23 23:41

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boyAll work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boyAll work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boyAll work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boyAll work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boyAll work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boyAll work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

Name: Anonymous 2012-03-24 8:39

>>6
LOW LEVEL C

look at him, look at him and laugh!

Name: Anonymous 2012-03-24 11:35

GC is shit.

Name: Sgt.Kabu䂄鄅kimanऽ 2012-05-28 23:01

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy

Don't change these.
Name: Email:
Entire Thread Thread List