[C] swapping vars

Feel like posting Off Topic? Do it here.

Moderator: MaxCoderz Staff

coelurus
Calc Wizard
Posts: 585
Joined: Sun 19 Dec, 2004 9:02 pm
Location: Sweden
Contact:

Post by coelurus »

As I said, I know very well what I'm doing. You can't seriously consider solving the Schrödinger equation in three dimensions in anything except C/C++ and professors don't care about anything else. Plus I keep away from silly tasks that require scripting, the task gotta be to too trivial then anyway :D

I thought I made things clear about optimizers these days:
They are cleverer than you. Read my last post.

Three xors is obfuscated code, ask anybody in the business.

Bloated applications are not bloated because the developers did not know what three xors in a row can do, it's about high level design flaws.

Ah well, this is my last post in this thread. No point wasting time on PC programming newcomers, hehe. (Take that with a bucketload of sarcasm-o-jelly.)
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

Why are 3 xors obfuscated?
Are you in the business?
Bloated applications are not bloated because the developers did not know what three xors in a row can do, it's about high level design flaws.
true, but that is no excuse
User avatar
hop
Extreme Poster
Posts: 378
Joined: Sat 09 Dec, 2006 3:42 pm

Post by hop »

King Harold wrote:
hop wrote:If I have a process running at 100% that long I'd rather use multiple threads and save 50% or 75% of the time due to omgmulticores rather than waste more of my time working the code than I'd ever get back in saved execution time.
that does not save time.
lolwut? Saving 30-45 minutes every hour doesn't save any time? And your 3.5 seconds per hour does?
hop wrote:What the hell are you doing with Azureus if it generally takes even 5% cpu? Or are you saying 5x0%? Are you running a Pentium 1 or something?
5% is 4% too much for a program that idles most of the time. It takes 10% here though, uTorrent about 1,5%, the difference is quite significant.

AMD 64 Athlon 3400+ @ 2.3 GHz, not pentium 1.
0-1% running the newest wtfisthisshit (Vuze or something) version which you shouldn't be using anyway. Only RAM use is higher than µtorrent, and only that for obvious reasons. If you don't want 10% cpu use I suggest you stop scrolling through the ugly naked women on the r&b album covers in the stupid commercial view.
Windows Vista doesn't actually do anything heavy except waste resources on purpose. When it isn't doing anything and supposed to be idle it keeps doing stuff and taking some CPU time that goes who-knows-where.
Ah that explains why my idle CPU use in Vista is 0-1% just like in XP (performance settings at max detail and all that in both).
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

hop wrote:lolwut? Saving 30-45 minutes every hour doesn't save any time? And your 3.5 seconds per hour does?
100% is 100%, if you get it down to 50 by adding a processor you're cheating, one could add 918374598134750 processors and claim that every horrible program performs good.
hop wrote:0-1% running the newest wtfisthisshit (Vuze or something) version which you shouldn't be using anyway. Only RAM use is higher than µtorrent, and only that for obvious reasons. If you don't want 10% cpu use I suggest you stop scrolling through the ugly naked women on the r&b album covers in the stupid commercial view.
Azureus uses more CPU time, clock it if you wish.
10% is bad because a program that carries out a similar task can do it with less. The 10% is used when Azureus is minimized to the tray.
hop wrote:Ah that explains why my idle CPU use in Vista is 0-1% just like in XP (performance settings at max detail and all that in both).
maybe for you, but we can't all have the newest computer with 5 processors and 4 video cards and 4GB RAM or more. Vista jams my RAM full up to 90% and gets a constant 15% CPU with all it's "tasks" combined. XP uses a nice 0 - 4% for me, which is good enough (even) for me.
User avatar
hop
Extreme Poster
Posts: 378
Joined: Sat 09 Dec, 2006 3:42 pm

Post by hop »

King Harold wrote:
hop wrote:lolwut? Saving 30-45 minutes every hour doesn't save any time? And your 3.5 seconds per hour does?
100% is 100%, if you get it down to 50 by adding a processor you're cheating, one could add 918374598134750 processors and claim that every horrible program performs good.
No, the additional cores aren't used automatically, the program has to make use of threads properly.
hop wrote:The 10% is used when Azureus is minimized to the tray.
Not on my dual core PC, my PIII server, or my sister's AMD 800. Nor my friend's dual core, laptops, and P4's.
hop wrote:Ah that explains why my idle CPU use in Vista is 0-1% just like in XP (performance settings at max detail and all that in both).
maybe for you, but we can't all have the newest computer with 5 processors and 4 video cards and 4GB RAM or more. Vista jams my RAM full up to 90% and gets a constant 15% CPU with all it's "tasks" combined. XP uses a nice 0 - 4% for me, which is good enough (even) for me.
Unlike you I've actually read more than one person's report on Vista's CPU and RAM performance and know that idle CPU use is similar to XP for systems with the recommended specs or higher, as it should be. RAM use is obviously higher due to more services and graphics, but similar again if you disable those.
User avatar
CDI
Maxcoderz Staff
Posts: 321
Joined: Tue 24 May, 2005 7:25 pm
Location: If I find out, you'll be first to know.
Contact:

Post by CDI »

I fail to see King Harold's point in any of this. In my humble opinion he is making himself look foolish and immature. Just my 2 cents.

And btw. Vista is on new machines today, with the same performance, as Windows XP was when it came out, and Windows 98, and Windows 95 before it. So stop complaining. The code for it is as good as you are going to get.

And the most CPU time I saw Azureus use was 10% when open, maximized, and running 3 torrents. On a 450MHz PIII on Windows 2k
ImageImage
User avatar
crzyrbl
Calc Wizard
Posts: 518
Joined: Wed 06 Jul, 2005 4:56 pm
Location: 3rd rock....

Post by crzyrbl »

CDI wrote:I fail to see King Harold's point in any of this. In my humble opinion he is making himself look foolish and immature.
Harold's not the only one :roll:
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.

Image
User avatar
Jim e
Calc King
Posts: 2457
Joined: Sun 26 Dec, 2004 5:27 am
Location: SXIOPO = Infinite lives for both players
Contact:

Post by Jim e »

What is still being debated here, trying to find out why King Harold's compy has such bad performance? It's not because of lack of low level optimizations.

I don't see any proof that substantiates King Harold's claims other than his opinion.
Image
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

You're not going to get proof I'm afraid, I switched to uTorrent for better performance.
And btw. Vista is on new machines today, with the same performance, as Windows XP was when it came out, and Windows 98, and Windows 95 before it.
you're saying XP used 90% RAM? I can give you a screeny of Vista using 90% when it's doing absolutely nothing if you like.
The code for it is as good as you are going to get.
true, but not as good as it could have been.

I fail to see King Harold's point in any of this.
then look. The point is that all those lazy programmers who aren't doing their utmost best to deliver good programs should get their cup of coffee and start thinking about doing something usefull, like optimizing just a little bit more. Even if it's just milliseconds, it does matter.
Not on my dual core PC
even if it did you aren't about to admit it anyway, but it doesn't matter, what matters is that there is a program that carry out the same task with less.

And that is were my opinion differs from almost everyone elses, no one seems to care about milliseconds, I do.

So, that is settled then isn't it? No amount of debating is ever going to change anyone's opinion, and I think we've just about ran out of things to say here.

one thing though:
In my humble opinion he is making himself look foolish and immature.
yea I'm 17 so.. call me immature all you want, it's than betting being called "dull adult" or some such.
Last edited by King Harold on Tue 08 May, 2007 10:34 am, edited 1 time in total.
0xROWDY
New Member
Posts: 9
Joined: Mon 30 Apr, 2007 11:15 am
Location: Australia

Post by 0xROWDY »

coelurus wrote:No point wasting time on PC programming newcomers, hehe. (Take that with a bucketload of sarcasm-o-jelly.)
I certainly should hope you were being sarcastic there!
It's the newbies that are the future of PC programming, those that are more experienced (providing they have the patience) should at least push them along rather than flame them!
Jim e wrote:I don't see any proof that substantiates King Harold's claims other than his opinion.
Although I do agree one should do their research before claiming much.
CDI wrote:And btw. Vista is on new machines today, with the same performance, as Windows XP was when it came out, and Windows 98, and Windows 95 before it. So stop complaining. The code for it is as good as you are going to get.
I assume you mean on a relative scale?
King Harold wrote:
And btw. Vista is on new machines today, with the same performance, as Windows XP was when it came out, and Windows 98, and Windows 95 before it.

you're saying XP used 90% RAM? I can give you a screeny of Vista using 90% when it's doing absolutely nothing if you like.
What are your PC's specs? I could only imagine this happening if you're using less than recommended RAM.
King Harold wrote:true, but not as good as it could have been.
I couldn't agree more. If only people could see Microsoft is leading them round by the horns!
Back to the original topic, I believe alot of programmers have become lazy using the shiny new hardware available today.
For example "MinuetOS". (If you haven't heard of it, google it). This operating system fits on a single floppy, presents itself with a very impressive GUI...
Image

Image

...with plenty of useful applications and game support!
Compare that with Micro$oft Vi$ta!
User avatar
hop
Extreme Poster
Posts: 378
Joined: Sat 09 Dec, 2006 3:42 pm

Post by hop »

King Harold wrote:The point is that all those lazy programmers who aren't doing their utmost best to deliver good programs should get their cup of coffee and start thinking about doing something usefull, like optimizing just a little bit more.
Here's something you're going to learn in college or real IT job soon: 80%-90% of all IT projects in the entire world don't conform to schedule. And you wan't programmers to spend another huge load of project time (remember, the last 20% of the work takes 80% of the time) on perfectionizing low level assembly code to save some milliseconds in execution time? I'd honestly rather they think of better algorithms (something there's already barely enough time for) and actual features because means are limited.
And that is were my opinion differs from almost everyone elses, no one seems to care about milliseconds, I do.
I care about milliseconds in algorithms too, but I care more about the general quality of the program than low level optimizations. Sure, if means (time and money) where unlimited you should raise the quality through the roof with high and low level optimizing, but that's simply not a realistic way of developing projects.
there is a program that carry out the same task with less.
Azureus does a huge load of other things that µtorrent does not. It's a lot more graphical, for starters. So it's not doing the exact same task. You want to use it for the same task, but all the other things it does make it too heavy for your preferences. That does not mean it's performing all the little tasks it does but you don't want it to do with poor performance.
In my humble opinion he is making himself look foolish and immature.
yea I'm 17 so.. call me immature all you want, it's betting being called "dull adult" or some such.
Fighting for your opinion is actually a lot more mature than half the people here claiming otherwise have ever been.
King Harold
Calc King
Posts: 1513
Joined: Sat 05 Aug, 2006 7:22 am

Post by King Harold »

Where is Azureus more graphical? uTorrent has the same pieces, blocks, and speed graphs forexample.
but that's simply not a realistic way of developing projects
finally a good argument, and truely, if you don't have the time then don't do low lvl optimizing, but otherwise...
Fighting for your opinion is actually a lot more mature than half the people here claiming otherwise have ever been.
thumbs up man ;)
What are your PC's specs?
here they come:

CPU-Eigenschappen
CPU Type AMD Athlon 64, 2300 MHz (11 x 209)
CPU Aanduiding ClawHammer S754
CPU Stepping CG
L1 Code Cache 64 KB
L1 Data-cache 64 KB
L2 Cache 1 MB (On-Die, Full-Speed)

CPU Technical Information
Casestype 754 Pin uOPGA
Casesize 4.00 cm x 4.00 cm
Transistors 105.9 million
Procestechnologie 9Mi, 0.13 um, CMOS, Cu, SOI
Verpakkingsoppervlak 193 mm2
Core Spanning 1.50 V
I/O Spanning 1.2 V + 2.5 V
Maximal performance 89.0 W (Depending on core speed)

CPU Fabrikant
Firmanaam Advanced Micro Devices, Inc.
Productinformatie http://www.amd.com/us-en/Processors/Pro ... 18,00.html

MoederbordProperties
Moederbord ID 07/06/2005-K8M800-8237-6A7L1G02C-00
Moederbordnaam Unknown

Front Side Bus Properties
Bus Type AMD Hammer
Real clockspeed 209 Mhz
Effective clockspeed 209 Mhz

Geheugenbus-Properties
Bus Type DDR SDRAM
Bus Width 64 bit
Real clockspeed 209 Mhz (DDR)
Effective clockspeed 418 Mhz
Bandwidth 3345 MB/s

Chipsetbus-Properties
Bus Type VIA V-Link
Bus Width 8 bit
Real clockspeed 70 Mhz
Effective clockspeed 70 Mhz
Bandwidth 70 MB/s

RAM: 512 PC3200 DDR SDRAM

Need to know more?

edit: o yes videocard: GeForce 6800 LE (hacked pixelpipelines) 128MB, AGP 8x, Omega 1.6693 (p), base speed: 700MHz core, 300MHz memory, auto overclocking.
CoBB
MCF Legend
Posts: 1601
Joined: Mon 20 Dec, 2004 8:45 am
Location: Budapest, Absurdistan
Contact:

Post by CoBB »

King Harold wrote:finally a good argument
Which has been brought up quite a few times already...
hop wrote:Fighting for your opinion is actually a lot more mature than half the people here claiming otherwise have ever been.
Deciding to let go of your opinion if it is based on insufficient research or faulty logic is mature. Clinging to unrealistic visions is harmful. If truth is not on your side, what's the point? Really, isn't it just a little bit suspicious that all these excellent developers are so vehemently arguing against the overblown importance of low-level optimisation? Are all of them deluded and the lone warrior is right? What's the odds of that?

King Harold, I don't disagree that software should be much more efficient, and you might have been around long enough to have seen me complain that older systems were more responsive than current ones, even despite the inferior hardware specs. I hate bloat and inefficiency. On the other hand, I'm still of the opinion that you're looking at the problems at the wrong level. Sure, milliseconds are important when you're in a tight loop, but it's rarely tight loops that are responsible for the efficiency problems. We might be spending a lot of time in them, but the first question should be whether we should enter them at all, and that's a problem on a much higher level.
User avatar
hop
Extreme Poster
Posts: 378
Joined: Sat 09 Dec, 2006 3:42 pm

Post by hop »

King Harold wrote:Where is Azureus more graphical? uTorrent has the same pieces, blocks, and speed graphs forexample.
Haven't you seen the whole ui looking like a flash app thing with all the online media info and stuff?
auto overclocking.
Check if the HTT speed doesn't exceed 1000Mhz or 2000T for DDR2. The HTT bus isn't ment to be overclocked and actually screws with performance if it is (you won't ever fill the bus at 1Ghz anyway). Auto settings are known to completely mess this up.
Really, isn't it just a little bit suspicious that all these excellent developers are so vehemently arguing against the overblown importance of low-level optimisation?
So you'll agree with me that the act of fighting for your opinion isn't immature, as that's just as much what said developers are doing.
CoBB
MCF Legend
Posts: 1601
Joined: Mon 20 Dec, 2004 8:45 am
Location: Budapest, Absurdistan
Contact:

Post by CoBB »

hop wrote:So you'll agree with me that the act of fighting for your opinion isn't immature, as that's just as much what said developers are doing.
I don't think there's any such relation between the willingness to fight and maturity. It's rather the means of this 'fight' that matters. No matter how long I keep looking at this discussion, I don't see any arguments for making low-level optimisation a top priority, neither in favour of the wonderful xor trick (apart from it being 'fun'), while there are quite a few points against them. Disagreement is not the problem--in fact, it's vital for real progress--, but the lack of balance in the arguments is.
Locked