POV-Ray : Newsgroups : povray.off-topic : Mac Plus vs AMD Dual Core Server Time
8 Oct 2026 19:50:22 EDT (-0400)
  Mac Plus vs AMD Dual Core (Message 51 to 100 of 170)  
<<< Previous 50 Messages Goto Latest 50 Messages Next 50 Messages >>>
From: scott
Subject: Re: Mac Plus vs AMD Dual Core
Date: 18 Oct 2007 04:00:48
Message: <471712b0@news.povray.org>
>> They don't!  If I open a blank Word document, that's 10 MB.
>
> ...which begs the question, "what are you using 10 MB for?"

I couldn't really care less.  10 MB is nothing on modern machines.  My 
digital camera generates 10 MB per shot, it's not really making me lose any 
sleep.

> There used to be word processors that would run inside less than 60 KB of 
> RAM. Sure, nobody could argue they had the same features. And sure, I can 
> see how adding lots more features would require quite a bit more RAM. But 
> 10,000 KB? That's not "quite a bit more". That's 170 *times* more!

You have more than 170 times more RAM now though.

> ...the point being that software for the Amiga was designed to not 
> *require* more than 2 MB in the first place.

What if you had an Amiga with only 512K or 1MB RAM?

What Windows software requires more than 1 or 2 GB of RAM anyway?

> (Because if it did, you just massively reduced your potential market.) 
> Back then, software only used memory if it was absolutely, unavoidably 
> necessary. Which is kind of my point...

Because you only had 2MB to spare, of course you couldn't include 600K of 
fancy bitmaps in RAM, a thesaurus, dictionary and grammar checker, you made 
a "bare bones" word processor that basically did the bare minimum to produce 
documents.  Now you can do all that cool stuff and of course it uses more 
RAM.  What's your point?

> (To actually answer your question, if you ask AmigaOS for 2.5 MB of RAM 
> when only 2 MB of physical RAM exists, you get a message that amounts to 
> "no, go away". One of the ways they kept the Amiga cheap was by not 
> including the hardware necessary for implementing virtual memory...)

So what if you take an AmigaOS program that tries to use eg 1.5 MB of RAM 
and run it on an old Amiga that only has 1MB?  It doesn't work.  What 
happens when you try to run a modern piece of software on an older PC?  It 
works ... but very slowly.

If you prefer the Amiga option, then just switch off virtual memory in 
Windows.


Post a reply to this message

From: tom millican
Subject: Re: Mac Plus vs AMD Dual Core
Date: 18 Oct 2007 10:56:43
Message: <4717742b@news.povray.org>
chromatograms? what kind of chromatograms?
I regret not getting to this thread sooner. We do have lab equipment
connected to PC's that use older interfaces.
There is an old Dell Inspiron 7000 (366MHz, 256mb RAM) running WinXP
connected to a Sartorius SC2. We used this old laptop while new Dells don't
come with rs232 ports. 
We also have a couple of Pentium IV machines with equipment connected via
ISA-slot GPIB cards. These also run WinXP, but one has 512mb RAM and
another has 1GB. All of these have far more RAM than they need for what
they do, but they have never had access to the internet, never had any
Windows updates, and aren't as bloated as typical office or personal
computers as a result of that. We even had to call in our registrations for
the Windows software just to avoid the risk of plugging into an ethernet
port to register.


Orchid XP v7 wrote:

> scott wrote:
>>> No. Our normal *lab* environment. ;-) The *office* just runs Word and
>>> Access. (And the guys in the lab insist on using Excel a lot...)
>> 
>> And I expect the guys in the office often want to include fancy graphics
>> into their Word documents, perhaps just company logos on a letter, or
>> photos/diagrams in a report.
> 
> Not really, no.
> 
> Just chromatagrams. I gather that they're quite large... (Well, the data
> is almost always very noisy.)
> 
>> All of which rapidly use up memory and
>> which would slow down hugely on a very slow machine.
>> 
>> Sure, they could use a plain text editor on an ancient machine with 32K
>> of RAM, but it's not going to look very professional.
> 
> My point is not so much that we should go back to using 32K machines,
> but rather that we should go back to the days of programs only using
> more than 32K if they *need* it for something. ;-)


Post a reply to this message

From: Orchid XP v7
Subject: Re: Mac Plus vs AMD Dual Core
Date: 18 Oct 2007 13:07:50
Message: <471792e6$1@news.povray.org>
Darren New wrote:

>> One of the ways they kept the Amiga cheap was by not including the 
>> hardware necessary for implementing virtual memory...)
> 
> The CPU didn't even support it, just like pre-386 days.

Correction: The Morotola 68000 series *does* have an optional MMU. And 
that's just it - optional. There was a special board you could get to 
install a replacement CPU with an MMU fitted, and software to go with it 
to add virtual memory to your Amiga.

So there. :-P


Post a reply to this message

From: Orchid XP v7
Subject: Re: Mac Plus vs AMD Dual Core
Date: 18 Oct 2007 13:12:40
Message: <47179408$1@news.povray.org>
scott wrote:
>>> They don't!  If I open a blank Word document, that's 10 MB.
>>
>> ...which begs the question, "what are you using 10 MB for?"
> 
> I couldn't really care less.  10 MB is nothing on modern machines.  My 
> digital camera generates 10 MB per shot, it's not really making me lose 
> any sleep.

A digital camera uses 10 MB for a reason - it's capturing a highly 
detailed digital image. That kind of thing requires storeage space. I 
have no problem with that.

>> There used to be word processors that would run inside less than 60 KB 
>> of RAM. Sure, nobody could argue they had the same features. And sure, 
>> I can see how adding lots more features would require quite a bit more 
>> RAM. But 10,000 KB? That's not "quite a bit more". That's 170 *times* 
>> more!
> 
> You have more than 170 times more RAM now though.

...so it's OK to waste 170 times more RAM?

And that's just my point. Just because we have all this stuff available 
does *not* mean it should just be wasted on inefficiency. Just think 
what the hell we could do with all this stuff if it wasn't being wasted 
all the time...

> What Windows software requires more than 1 or 2 GB of RAM anyway?

Apophysis. ;-) Not that that matters here...

>> (Because if it did, you just massively reduced your potential market.) 
>> Back then, software only used memory if it was absolutely, unavoidably 
>> necessary. Which is kind of my point...
> 
> Because you only had 2MB to spare, of course you couldn't include 600K 
> of fancy bitmaps in RAM, a thesaurus, dictionary and grammar checker, 
> you made a "bare bones" word processor that basically did the bare 
> minimum to produce documents.  Now you can do all that cool stuff and of 
> course it uses more RAM.  What's your point?

My point is that 20 years ago I had a word processor with a spell 
checker and it didn't require 10 MB.

> So what if you take an AmigaOS program that tries to use eg 1.5 MB of 
> RAM and run it on an old Amiga that only has 1MB?  It doesn't work.  
> What happens when you try to run a modern piece of software on an older 
> PC?  It works ... but very slowly.
> 
> If you prefer the Amiga option, then just switch off virtual memory in 
> Windows.

Apparently you still don't understand what I'm trying to say...


Post a reply to this message

From: Darren New
Subject: Re: Mac Plus vs AMD Dual Core
Date: 19 Oct 2007 00:35:11
Message: <471833ff$1@news.povray.org>
Orchid XP v7 wrote:
> Darren New wrote:
> 
>>> One of the ways they kept the Amiga cheap was by not including the 
>>> hardware necessary for implementing virtual memory...)
>>
>> The CPU didn't even support it, just like pre-386 days.
> 
> Correction: The Morotola 68000 series *does* have an optional MMU. And 
> that's just it - optional. There was a special board you could get to 
> install a replacement CPU with an MMU fitted,

Right.  A replacement CPU.  I.e., the 68000 didn't support virtual 
memory. The 68010 did. So you replace the 68000 with a 68010, and you 
can do virtual memory.

And the 68020 supports 32-bit addressing.

-- 
   Darren New / San Diego, CA, USA (PST)
     Remember the good old days, when we
     used to complain about cryptography
     being export-restricted?


Post a reply to this message

From: Orchid XP v7
Subject: Re: Mac Plus vs AMD Dual Core
Date: 19 Oct 2007 13:09:01
Message: <4718e4ad$1@news.povray.org>
Darren New wrote:
> Orchid XP v7 wrote:
>> Darren New wrote:
>>
>>>> One of the ways they kept the Amiga cheap was by not including the 
>>>> hardware necessary for implementing virtual memory...)
>>>
>>> The CPU didn't even support it, just like pre-386 days.
>>
>> Correction: The Morotola 68000 series *does* have an optional MMU. And 
>> that's just it - optional. There was a special board you could get to 
>> install a replacement CPU with an MMU fitted,
> 
> Right.  A replacement CPU.  I.e., the 68000 didn't support virtual 
> memory. The 68010 did. So you replace the 68000 with a 68010, and you 
> can do virtual memory.
> 
> And the 68020 supports 32-bit addressing.

I emphasise: The Morotola 68000 *series*. (Of which different Amigas had 
varying versions.)

My point is, the hardware supports it if you pay extra money. It's just 
an extra-cost option rather than standard like these days. (There was 
also a big performance hit, IIRC...)


Post a reply to this message

From: Darren New
Subject: Re: Mac Plus vs AMD Dual Core
Date: 19 Oct 2007 18:18:20
Message: <47192d2c$1@news.povray.org>
Orchid XP v7 wrote:
> I emphasise: The Morotola 68000 *series*. (Of which different Amigas had 
> varying versions.)

Really? I thought they were all 68000.  OK.

-- 
   Darren New / San Diego, CA, USA (PST)
     Remember the good old days, when we
     used to complain about cryptography
     being export-restricted?


Post a reply to this message

From: Orchid XP v7
Subject: Re: Mac Plus vs AMD Dual Core
Date: 20 Oct 2007 04:27:35
Message: <4719bbf7$1@news.povray.org>
Darren New wrote:
> Orchid XP v7 wrote:
>> I emphasise: The Morotola 68000 *series*. (Of which different Amigas 
>> had varying versions.)
> 
> Really? I thought they were all 68000.  OK.

For example, the Amiga 1200 shipped from the factory with the 68020 
running at 14 MHz. (Actually, the 68EC020, which lacks the MMU.)

IIRC, I later upgraded mine to a 68030 + FPU...


Post a reply to this message

From: scott
Subject: Re: Mac Plus vs AMD Dual Core
Date: 22 Oct 2007 02:44:23
Message: <471c46c7$1@news.povray.org>
> (There was also a big performance hit, IIRC...)

So, asking a program to use 3MB of RAM on a 2MB Amiga with the VM support is 
different to you trying to use more than 256MB on your Windows machine how?


Post a reply to this message

From: scott
Subject: Re: Mac Plus vs AMD Dual Core
Date: 22 Oct 2007 02:53:32
Message: <471c48ec$1@news.povray.org>
> Apparently you still don't understand what I'm trying to say...

That you'd prefer 99% of your RAM to be left unused, while sitting at very 
basic and streamlined versions of the OS and all applications (that the 
developers have spend years optimising RAM usage to a bare minimum and so is 
generations behind what is normal today and 5x the price)?

Perhaps I don't understand then...


Post a reply to this message

From: Orchid XP v7
Subject: Re: Mac Plus vs AMD Dual Core
Date: 22 Oct 2007 15:49:55
Message: <471cfee3@news.povray.org>
scott wrote:
>> (There was also a big performance hit, IIRC...)
> 
> So, asking a program to use 3MB of RAM on a 2MB Amiga with the VM 
> support is different to you trying to use more than 256MB on your 
> Windows machine how?

95% of all Amigas are factory standard. If your software requires custom 
hardware, you just lost 95% of your market.

All PCs on the market already have VM hardware.


Post a reply to this message

From: Orchid XP v7
Subject: Re: Mac Plus vs AMD Dual Core
Date: 22 Oct 2007 15:50:38
Message: <471cff0e$1@news.povray.org>
scott wrote:
>> Apparently you still don't understand what I'm trying to say...
> 
> That you'd prefer 99% of your RAM to be left unused, while sitting at 
> very basic and streamlined versions of the OS and all applications (that 
> the developers have spend years optimising RAM usage to a bare minimum 
> and so is generations behind what is normal today and 5x the price)?
> 
> Perhaps I don't understand then...

No - I'd like 99% of my RAM available for doing *useful work*, not just 
wasted because lazy programmers couldn't be bothered to fix their code.


Post a reply to this message

From: Darren New
Subject: Re: Mac Plus vs AMD Dual Core
Date: 22 Oct 2007 17:10:18
Message: <471d11ba$1@news.povray.org>
Orchid XP v7 wrote:
> No - I'd like 99% of my RAM available for doing *useful work*, not just 
> wasted because lazy programmers couldn't be bothered to fix their code.

Code doesn't even get read off the disk these days unless you use it. 
The amount of data in control structures is tiny compared to the amount 
of RAM in a modern computer, and the amount of RAM occupied by actual 
data. Why do you think enough of it is wasted that it's worth spending 
the time and effort reducing the amount used?

-- 
   Darren New / San Diego, CA, USA (PST)
     Remember the good old days, when we
     used to complain about cryptography
     being export-restricted?


Post a reply to this message

From: scott
Subject: Re: Mac Plus vs AMD Dual Core
Date: 23 Oct 2007 03:31:16
Message: <471da344@news.povray.org>
>> So, asking a program to use 3MB of RAM on a 2MB Amiga with the VM support 
>> is different to you trying to use more than 256MB on your Windows machine 
>> how?
>
> 95% of all Amigas are factory standard. If your software requires custom 
> hardware, you just lost 95% of your market.
>
> All PCs on the market already have VM hardware.

So it's ok for Amigas to be slow with VM, but for Windows PCs you expect 
them to magically use VM as fast as normal RAM?


Post a reply to this message

From: scott
Subject: Re: Mac Plus vs AMD Dual Core
Date: 23 Oct 2007 03:44:02
Message: <471da642$1@news.povray.org>
> No - I'd like 99% of my RAM available for doing *useful work*,

You could always install a minimum Linux build and use a plain-text editor 
instead of MS Word.

What's your definition of useful work btw?  I think it would probably be 
quite different to most other users of Windows.

> not just wasted because lazy programmers couldn't be bothered to fix their 
> code.

Why on Earth should they optimise a program for minimum-RAM footprint that 
uses only 10MB in the first place??!?!  It would be a total WASTE of time 
and money for precisely ZERO benefit.

Sure, if your program is using a huge chunk of RAM then it would probably be 
worth spending time trying to make sure it is optimised, but for something 
that is only using 10MB in the first place it's a total waste of time.

In fact, I think the whole MS OS and Office apps have probably been 
optimised for speed, not RAM usage, as todays machines have many times more 
RAM than you could ever use by loading even 50 copies of Word and 
PowerPoint.


Post a reply to this message

From: Brian Elliott
Subject: Re: Mac Plus vs AMD Dual Core
Date: 23 Oct 2007 05:15:44
Message: <471dbbc0$1@news.povray.org>
Chop the tails off the Cathedral mice!  Their tails take up too much space!!

  :-D


Post a reply to this message

From: Orchid XP v7
Subject: Re: Mac Plus vs AMD Dual Core
Date: 23 Oct 2007 13:07:58
Message: <471e2a6e@news.povray.org>
scott wrote:
>>> So, asking a program to use 3MB of RAM on a 2MB Amiga with the VM 
>>> support is different to you trying to use more than 256MB on your 
>>> Windows machine how?
>>
>> 95% of all Amigas are factory standard. If your software requires 
>> custom hardware, you just lost 95% of your market.
>>
>> All PCs on the market already have VM hardware.
> 
> So it's ok for Amigas to be slow with VM, but for Windows PCs you expect 
> them to magically use VM as fast as normal RAM?

No, that's not what I'm saying.

What I was saying was that on the Motorola 68000 series, turning on the 
MMU (regardless of whether you use it to implement VM or whatever) 
imposed a largish performance hit on all running code. And that is all.


Post a reply to this message

From: Orchid XP v7
Subject: Re: Mac Plus vs AMD Dual Core
Date: 23 Oct 2007 13:19:43
Message: <471e2d2f$1@news.povray.org>
scott wrote:
>> No - I'd like 99% of my RAM available for doing *useful work*,
> 
> You could always install a minimum Linux build and use a plain-text 
> editor instead of MS Word.

It's surprising how much RAM even that requires... You'd think it would 
be a few KB, but apparently not.

> What's your definition of useful work btw?  I think it would probably be 
> quite different to most other users of Windows.

Why? Because I want to use the RAM for surfing the Internet or holding 
that document I'm working on, rather than storing some useless annoying 
animated paperclib?

>> not just wasted because lazy programmers couldn't be bothered to fix 
>> their code.
> 
> Why on Earth should they optimise a program for minimum-RAM footprint 
> that uses only 10MB in the first place??!?!  It would be a total WASTE 
> of time and money for precisely ZERO benefit.

It saddens me that these days people think producing a superior product 
is "a waste of time".

> Sure, if your program is using a huge chunk of RAM then it would 
> probably be worth spending time trying to make sure it is optimised, but 
> for something that is only using 10MB in the first place it's a total 
> waste of time.

You say "only" as if 10 MB is a small amount of RAM...

> In fact, I think the whole MS OS and Office apps have probably been 
> optimised for speed, not RAM usage, as todays machines have many times 
> more RAM than you could ever use by loading even 50 copies of Word and 
> PowerPoint.

Given how badly many of the PCs at work struggle to run Word, I doubt 
that...

I guess it just comes down to how frustrating it is that my PC takes 30 
seconds to load or close any given application. I mean, 20 *years* ago 
computers could do that instanteneously with a fraction of the RAM and 
CPU power. Why are we not coding like that any more??


Post a reply to this message

From: Alain
Subject: Re: Mac Plus vs AMD Dual Core
Date: 23 Oct 2007 16:57:26
Message: <471e6036$1@news.povray.org>
Orchid XP v7 nous apporta ses lumieres en ce 2007/10/23 13:19:

> I guess it just comes down to how frustrating it is that my PC takes 30 
> seconds to load or close any given application. I mean, 20 *years* ago 
> computers could do that instanteneously with a fraction of the RAM and 
> CPU power. Why are we not coding like that any more??
20 years ago, a striped down version of a document you use today may not fit on 
your HD, if you where lucky enough to have one, or would need several floppies.
20 years ago, applications where still in the "stone age", with only a small 
fraction of the functionality you have today, making them much smaller. 20 years 
ago, there was no "what you see is what you get"! It was white text on black 
with formating codes breaking your text. You had to actualy print your document 
to realy know how it will print.
At that time, there was already some programms that needed almost a minute to 
get up and running...
When you only have less than 64K to play with, you often had to do some 
acrobatics to cram the programm AND it's data on your machine.

-- 
Alain
-------------------------------------------------

You know you've been raytracing too long when you've converted POV-Ray into an 
operating system; now you've got all the system resources to do your renderings.
Vimal N. Lad / Gautam N. Lad


Post a reply to this message

From: Gail Shaw
Subject: Re: Mac Plus vs AMD Dual Core
Date: 23 Oct 2007 17:03:02
Message: <471e6186@news.povray.org>
"Alain" <ele### [at] netscapenet> wrote in message
news:471e6036$1@news.povray.org...

> When you only have less than 64K to play with, you often had to do some
> acrobatics to cram the programm AND it's data on your machine.
>

I have un-fond memories of the hoops I had to jump through to get X-Wing
running. TSRs had to be loaded in precisely the right order, or there
wouldn't be enough memory.


Post a reply to this message

From: Gail Shaw
Subject: Re: Mac Plus vs AMD Dual Core
Date: 23 Oct 2007 17:09:49
Message: <471e631d@news.povray.org>
"Orchid XP v7" <voi### [at] devnull> wrote in message
news:471e2d2f$1@news.povray.org...

> >> not just wasted because lazy programmers couldn't be bothered to fix
> >> their code.
> >
> > Why on Earth should they optimise a program for minimum-RAM footprint
> > that uses only 10MB in the first place??!?!  It would be a total WASTE
> > of time and money for precisely ZERO benefit.
>
> It saddens me that these days people think producing a superior product
> is "a waste of time".

It is a waste when there's no return on the time spent. Software is a
business. If you write software for a software house and tell the planners
and designers that you need a week to optimise the code so that it takes a
quarter of the memory it would otherwise need, they'll likly to tell you to
get lost. That week is a week not spent adding features to the program, and
its features that sell, not efficiency or beauty of code.

That's the reality of the software business. When you're writing code for
fun, you can spend several days getting things as optimal as you like,
because you're working on your own time.

Ref: http://www.codinghorror.com/blog/archives/000980.html


Post a reply to this message

From: scott
Subject: Re: Mac Plus vs AMD Dual Core
Date: 24 Oct 2007 03:08:59
Message: <471eef8b$1@news.povray.org>
>> Why on Earth should they optimise a program for minimum-RAM footprint 
>> that uses only 10MB in the first place??!?!  It would be a total WASTE of 
>> time and money for precisely ZERO benefit.
>
> It saddens me that these days people think producing a superior product is 
> "a waste of time".

Look, nobody in the world apart from you cares if Word uses up 10MB or 6MB 
of RAM, Microsoft are not going to employ 50 people for a few months to go 
through and optimise for RAM usage just to make you feel better.  In fact, 
if they did that they'd probably sacrifice speed by using less 
speed-efficient data structures somewhere, compressed graphics, or such 
like.  I'm pretty sure that they don't just randomly insert code to use up 
RAM for no reason...

When they are writing something like Word, which they know is going to use a 
tiny % of RAM compared to what everyone has, I am pretty sure they 
prioritise it loading up and doing stuff quickly rather than using a minimum 
amount of RAM.  Why do it the other way round?

> You say "only" as if 10 MB is a small amount of RAM...

I can buy a 1024 MB USB stick for £5.87 (from ebuyer.com).  That makes 10 MB 
cost about 6p.  Fast RAM for a computer is about 5 or 6 times that price - 
not much is it?  The cheapest machine on the Dell website (£359) comes with 
1024 MB RAM.  I open up task manager and I have 21 processes using more than 
10MB of RAM.  To me, 10MB seems pretty small.

> Given how badly many of the PCs at work struggle to run Word, I doubt 
> that...

It's not our fault your company has updated the software without updating 
the hardware in 10 years.

> I guess it just comes down to how frustrating it is that my PC takes 30 
> seconds to load or close any given application.

Get a new PC dude - I'm pretty sure that even if you spend £50 on ebay you'd 
be way better off.  Why are you still using an ancient pile of junk to try 
and run modern software?

> I mean, 20 *years* ago computers could do that instanteneously with a 
> fraction of the RAM and CPU power. Why are we not coding like that any 
> more??

Because we (well, most of us) have better computers than we did 20 years 
ago?


Post a reply to this message

From: Jim Henderson
Subject: Re: Mac Plus vs AMD Dual Core
Date: 24 Oct 2007 12:48:01
Message: <471f7741@news.povray.org>
On Wed, 24 Oct 2007 09:08:59 +0200, scott wrote:

> Look, nobody in the world apart from you cares if Word uses up 10MB or
> 6MB of RAM,

Um, not nobody.  It's bothered me for a long time that as computers get 
faster and faster that coding gets sloppier and sloppier.

I realise the realities of software development (given that I work for a 
software company), but if coders were taught to make their code efficient 
to start with, then it would be less of a problem.  The problem doesn't 
start in the software development houses, it starts at school when 
students are learning how to code and are taught bad habits from the 
start.

If coders learned how to write efficient code to start with, there would 
be less wastage of memory in a system (regardless of whether it's a 64K 
system or a 4 GB system), and wasting less memory means more can be done 
with the system at any given time.

Jim


Post a reply to this message

From: Jim Henderson
Subject: Re: Mac Plus vs AMD Dual Core
Date: 24 Oct 2007 12:56:57
Message: <471f7959$1@news.povray.org>
On Wed, 24 Oct 2007 12:48:01 -0400, Jim Henderson wrote:

> The problem doesn't
> start in the software development houses, it starts at school when
> students are learning how to code and are taught bad habits from the
> start.

As an example, I remember a core component of a popular server OS that 
would, under certain circumstances, display negative disk space free.

This looks quite stupid when it happens - since clearly that's not a 
possible situation.  The bug was deemed to be a "cosmetic" error and was 
never fixed.  Customers looked at it and said "if that sort of error 
exists, what am I *not* seeing?"

To someone with a little background in C (the language used for the tool 
in question), it's clear that the problem was either (a) sloppy 
declaration of the variable type, letting the default signed value be 
used rather than specifying an unsigned data type or (b) poor use of the 
formatting specification when the data was output, using a signed output 
type when an unsigned data type was used.

Either way is not good.  It's an easy mistake to make, but if they've 
internalized the need to be specific, then this sort of thing wouldn't 
happen.

Jim


Post a reply to this message

From: Warp
Subject: Re: Mac Plus vs AMD Dual Core
Date: 24 Oct 2007 13:21:47
Message: <471f7f2a@news.povray.org>
Jim Henderson <nos### [at] nospamcom> wrote:
> (a) sloppy 
> declaration of the variable type, letting the default signed value be 
> used rather than specifying an unsigned data type

  How exactly would that solve the problem? The only difference would be
that instead of seeing something like "-1234" you would see something like
"4294966062" (or "18446744073709550382" if they are using 64-bit values),
which isn't any more helpful. In fact, it's actually worse because it's
even more confusing.

  On a different note, I have been changing my habit with regard to this.
In the past I followed the practice "always use unsigned values for things
where negative values don't make sense, only use signed values where negative
values make sense and are possible". However, I have noticed more and more
how this cause more problems than it's worth.
  The current trend in programming guides is becoming more "always use
signed values unless there's a good reason not to", and I am starting
to agree with that.

  One good example: Assume you have a bitmap in memory. The dimensions of
bitmaps are always positive. Negative values don't make any sense with such
a thing as bitmap dimensions. These dimensions will never be negative.
Thus it makes sense to use unsigned values to represent the dimensions of
the bitmap?

  However, suppose that you want to draw the bitmap on screen, at a given
position. The position if the bitmap on the screen is given as pixel
coordinates so that the center of the bitmap is located at those coordinates.
It's perfectly valid if the bitmap is partially outside the screen. This
means that the upper-left corner screen coordinates of the bitmap can be
negative. The center coordinates themselves could be negative too.

  Usually when you draw a bitmap on screen you specify its position on
screen by its upper left corner coordinate. Thus you would calculate these
coordinates with something like (x - width/2, y - height/2).

  Since x and y are signed integers and width and height are unsigned
integers, you are now mixing signed and unsigned integers, causing some
implicit conversions, and possibly producing a compiler warning.

  Moreover, comparing (signed) coordinates with the (usigned) bitmap
dimensions are even more likely to give you problems, or at least compiler
warnings, for example in something like "if(x < width)".

  The handiest way of doing this is to keep the bitmap dimensions as
signed integers. Even though they never get negative values, they can
be part of expressions which result in negative values, and thus there
will not be any surprising problems with implicit conversions nor compiler
warnings.

-- 
                                                          - Warp


Post a reply to this message

From: Jim Henderson
Subject: Re: Mac Plus vs AMD Dual Core
Date: 24 Oct 2007 13:44:27
Message: <471f847b$1@news.povray.org>
On Wed, 24 Oct 2007 13:21:47 -0400, Warp wrote:

>> (a) sloppy
>> declaration of the variable type, letting the default signed value be
>> used rather than specifying an unsigned data type
> 
>   How exactly would that solve the problem? The only difference would be
> that instead of seeing something like "-1234" you would see something
> like "4294966062" (or "18446744073709550382" if they are using 64-bit
> values), which isn't any more helpful. In fact, it's actually worse
> because it's even more confusing.

Because the problem was caused by an overflow condition in the 
calculator.  IIRC, I did the math, and the value was in fact correct, 
just with the wrong sign.  But the fact that it evaluated as a negative 
number threw all sorts of other issues with regards to filesystem 
compression and problems with server-based programs that were checking 
for free space and seeing there was none available when in fact there was 
more than enough.

Jim


Post a reply to this message

From: Orchid XP v7
Subject: Re: Mac Plus vs AMD Dual Core
Date: 24 Oct 2007 13:57:02
Message: <471f876e$1@news.povray.org>
scott wrote:

> Look, nobody in the world apart from you cares

Yeah, I noticed. And I guess that's why this situation has been allowed 
to come into existence.

> Microsoft are not going to employ 50 people for a few months 
> to go through and optimise for RAM usage just to make you feel better.

Indeed no - their job is to research new techniques for slowing software 
down as much as possible to boost sales of expensive new hardware. 
(Presumably this is why the hardware vendors love them so much...)

> I'm pretty sure that they don't just randomly insert code to use 
> up RAM for no reason...

Oh really? Do you have any actual evidence for that?

(I doubt most people make inefficient code on purpose, but M$ I'm not so 
sure about.)

>> You say "only" as if 10 MB is a small amount of RAM...
> 
> I can buy a 1024 MB USB stick for £5.87 (from ebuyer.com).  That makes 
> 10 MB cost about 6p.  Fast RAM for a computer is about 5 or 6 times that 
> price - not much is it?

Now I'm puzzled - when I bought 1 GB of RAM for my PC, I had to pay 
several hundred pounds for it... Am I living in an alternate reality or 
something?

>> I mean, 20 *years* ago computers could do that instanteneously with a 
>> fraction of the RAM and CPU power. Why are we not coding like that any 
>> more??
> 
> Because we (well, most of us) have better computers than we did 20 years 
> ago?

And that's just it, isn't it?

Why bother fixing the problem when you can just throw more hardware at it.

It's like those stories you read about on The Daily WTF where some idiot 
puts together a horribly inefficient SQL system, and rather than make 
the obvious change to improve performance, the client ends up buying a 
small cluster of high-end servers. What the hell is WRONG with the world?!


Post a reply to this message

From: Darren New
Subject: Re: Mac Plus vs AMD Dual Core
Date: 24 Oct 2007 14:23:23
Message: <471f8d9b$1@news.povray.org>
scott wrote:
> Look, nobody in the world apart from you cares if Word uses up 10MB or 
> 6MB of RAM, Microsoft are not going to employ 50 people for a few months 
> to go through and optimise for RAM usage just to make you feel better.  

On the other hand, they *do* optimize disk usage. Ever look at the 
full-blown "advanced" tab on the installer? There's probably 50 
different independent packages you can decide to install or not.

>> I mean, 20 *years* ago computers could do that instanteneously with a 
>> fraction of the RAM and CPU power. Why are we not coding like that any 
>> more??
> 
> Because we (well, most of us) have better computers than we did 20 years 
> ago?

And 50 years ago, people were hand-compiling machine code, punching it 
on tape, and watching the results by actually looking at the bits in 
memory as they glowed on the screen.  So? :-)

I'm still surprised I can get a shaded textured 3D scene with shadows 
calculated refreshed faster than my monitor sync rate, but PowerPoint 
can't smoothly scroll text onto the screen without tearing it. :-?

-- 
   Darren New / San Diego, CA, USA (PST)
     Remember the good old days, when we
     used to complain about cryptography
     being export-restricted?


Post a reply to this message

From: Darren New
Subject: Re: Mac Plus vs AMD Dual Core
Date: 24 Oct 2007 14:26:10
Message: <471f8e42$1@news.povray.org>
Jim Henderson wrote:
> To someone with a little background in C 

There's the problem right there.  As one professor I knew put it, "There 
are two kinds of languages. The ones that support unbounded arithmetic 
types, and the ones that don't know they need to support unbounded 
arithmetic types."

I can't tell you how many tools I went through looking for one that 
would handle a file >4G for restartable downloads. I finally had to 
install bittorrent at both ends just to move the file across the 
network.  In spite of the fact that FTP uses ASCII representations for 
all numbers, and hence has no inherent limitation in the protocol.

-- 
   Darren New / San Diego, CA, USA (PST)
     Remember the good old days, when we
     used to complain about cryptography
     being export-restricted?


Post a reply to this message

From: Darren New
Subject: Re: Mac Plus vs AMD Dual Core
Date: 24 Oct 2007 14:29:23
Message: <471f8f03$1@news.povray.org>
Jim Henderson wrote:
> Because the problem was caused by an overflow condition in the 
> calculator. 

Actually, Thief has a similar problem in its installer. If you're within 
60 meg (or so) of having 32G free disk space free, it won't install, 
complaining you don't have enough space. If you then create a 80 meg 
file, it'll install fine.

Oh, and Warp, they aren't "unsigned integers" and "signed integers" in 
C. They're "ints", not "integers".  ;-) That's the root of the problem. 
Mixing signed integers and unsigned integers are fine. It's just C's 
weird conversion rules for ints that are problematic. ;-)  </nit>

-- 
   Darren New / San Diego, CA, USA (PST)
     Remember the good old days, when we
     used to complain about cryptography
     being export-restricted?


Post a reply to this message

From: Warp
Subject: Re: Mac Plus vs AMD Dual Core
Date: 24 Oct 2007 15:03:44
Message: <471f970f@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> Oh, and Warp, they aren't "unsigned integers" and "signed integers" in 
> C. They're "ints", not "integers".  ;-) That's the root of the problem. 
> Mixing signed integers and unsigned integers are fine. It's just C's 
> weird conversion rules for ints that are problematic. ;-)  </nit>

  So the implicit conversion rules of C for signed and unsigned integers
are weird? Care to suggest better conversion rules?

-- 
                                                          - Warp


Post a reply to this message

From: Warp
Subject: Re: Mac Plus vs AMD Dual Core
Date: 24 Oct 2007 15:13:58
Message: <471f9976@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> There's the problem right there.  As one professor I knew put it, "There 
> are two kinds of languages. The ones that support unbounded arithmetic 
> types, and the ones that don't know they need to support unbounded 
> arithmetic types."

  Having automatic unbounded arithmetic types is fine as long as you don't
care about efficiency.

  Integral types which support unlimited precision can *not* be as efficient
as CPU-register-sized integers unless you explicitly tell to the compiler
that "this variable will always stay within these limits", in which case
you are already stuck with the same limitation as the C integral variables.
If you don't tell the compiler those limits and it has to make sure that
in case of overflow it switches to unlimited precision, then those integral
types simply cannot be as fast as the bounded ones. It's just physically
impossible. If nothing else, the compiler will have to add an overflow
check after each single operation done with those integers, thus adding
clock cycles and code size (filling code caches faster).

  I'm also sure that being forced to prepare for unlimited precision math
makes many compiler optimizations impossible (which would be possible with
register-sized integers).

  (Also, in the general case a compiler cannot deduce by examining a piece
of code that a variable will never have a value outside certain boundaries.
I'm certain this kind of check would be equivalent to the halting problem.)

-- 
                                                          - Warp


Post a reply to this message

From: Tim Cook
Subject: Re: Mac Plus vs AMD Dual Core
Date: 24 Oct 2007 15:14:18
Message: <471f998a$1@news.povray.org>
Aw quit yer complainin' and write your own microscopic software if you 
wants it.  That's the proper *nix-user attitude.  XD

-- 
Tim Cook
http://home.bellsouth.net/p/PWP-empyrean

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------


Post a reply to this message

From: Warp
Subject: Re: Mac Plus vs AMD Dual Core
Date: 24 Oct 2007 15:21:15
Message: <471f9b2b@news.povray.org>
Tim Cook <z99### [at] bellsouthnet> wrote:
> Aw quit yer complainin' and write your own microscopic software if you 
> wants it.  That's the proper *nix-user attitude.  XD

  That's right. Open Office is open source, so it's a good start. Go and
optimize it until it's small enough for your taste.

-- 
                                                          - Warp


Post a reply to this message

From: Orchid XP v7
Subject: Re: Mac Plus vs AMD Dual Core
Date: 24 Oct 2007 15:22:25
Message: <471f9b71$1@news.povray.org>
Warp wrote:
> Tim Cook <z99### [at] bellsouthnet> wrote:
>> Aw quit yer complainin' and write your own microscopic software if you 
>> wants it.  That's the proper *nix-user attitude.  XD
> 
>   That's right. Open Office is open source, so it's a good start. Go and
> optimize it until it's small enough for your taste.

Arguably it would be faster to start again from scratch rather than try 
and learn the OO codebase... :-S


Post a reply to this message

From: Jim Henderson
Subject: Re: Mac Plus vs AMD Dual Core
Date: 24 Oct 2007 15:44:53
Message: <471fa0b5$1@news.povray.org>
On Wed, 24 Oct 2007 18:57:07 +0100, Orchid XP v7 wrote:

> Indeed no - their job is to research new techniques for slowing software
> down as much as possible to boost sales of expensive new hardware.
> (Presumably this is why the hardware vendors love them so much...)

That's been my working theory for years.  Goes something like this:

NetWare:  Solid, stable, reliable OS.  No possibility for hardware 
upgrades (until 4.x came out) or extended support contracts, because it 
just worked.

Windows:  Higher hardware requirements, not as stable as NetWare, so 
requires ongoing maintenance, support, and you hope that they'll fix the 
bugs in the current version in the next version so you have an upgrade 
opportunity.  Of course, with the new version comes higher hardware 
requirements, so the vendor gets to make their hardware sales quotas, and 
you'll want support as well, so a reseller can also sell a support 
contract with the hardware and SW installation.

Things have changed a bit over the last few years, of course, but I never 
wondered why resellers didn't push NetWare over Windows, and I still 
don't.  There's no money in it for them.

I've always said that Microsoft was the king of making software that was 
"just good enough".  IOW, it's good enough that most people are not 
willing to go to the expense of switching, even though there's plenty to 
complain about.  They then managed to find the right upgrade price point 
that played to the business people - the point at which it's too 
expensive *immediately* to switch to something better as opposed to just 
getting the upgrades and praying.  Businesses that tend to look more than 
a quarter or two out on their financial planning tend to be more likely 
to switch; businesses where turnover is fairly high and people are only 
concerned about the next couple of quarters' worth of spending are less 
likely to switch.

Jim


Post a reply to this message

From: Jim Henderson
Subject: Re: Mac Plus vs AMD Dual Core
Date: 24 Oct 2007 15:47:30
Message: <471fa152@news.povray.org>
On Wed, 24 Oct 2007 11:26:11 -0700, Darren New wrote:

> Jim Henderson wrote:
>> To someone with a little background in C
> 
> There's the problem right there.  As one professor I knew put it, "There
> are two kinds of languages. The ones that support unbounded arithmetic
> types, and the ones that don't know they need to support unbounded
> arithmetic types."

Yep, I can see that - the need for arbitrary-size variables (and the 
supporting math libraries) has become much more important.

That said, though, I'm talking about a product developed over 10 years 
ago, and from having seen bits of the source code and knowing many of the 
developers, that would've been the "language of choice" at the time.

> I can't tell you how many tools I went through looking for one that
> would handle a file >4G for restartable downloads. I finally had to
> install bittorrent at both ends just to move the file across the
> network.  In spite of the fact that FTP uses ASCII representations for
> all numbers, and hence has no inherent limitation in the protocol.

I see that problem all the time myself as well - I make downloads 
available for a limited audience using a tool that has problems with IE7 
(of all things) because they're too big - FF doesn't have a problem with 
them, and many of the download managers we suggest also work fine (I use 
wget and never have a problem with > 4 GB file sizes).

Jim


Post a reply to this message

From: Jim Henderson
Subject: Re: Mac Plus vs AMD Dual Core
Date: 24 Oct 2007 15:51:18
Message: <471fa236$1@news.povray.org>
On Wed, 24 Oct 2007 20:22:30 +0100, Orchid XP v7 wrote:

> Arguably it would be faster to start again from scratch rather than try
> and learn the OO codebase... :-S

Doubt it, otherwise new coders coming into the project would never get 
started (into any project, for that matter).

I got access to the code for one of the products I used to support, and 
it was several million lines of code.  The engineering manager who 
granted me the access said they *normally* spend at least 6 solid months 
of examining and learning the code before they're allowed to commit 
changes.

And that's a minimum of 8 hours a day of doing code review...for 6 
months...

Jim


Post a reply to this message

From: Orchid XP v7
Subject: Re: Mac Plus vs AMD Dual Core
Date: 24 Oct 2007 16:14:49
Message: <471fa7b9$1@news.povray.org>
Jim Henderson wrote:
> On Wed, 24 Oct 2007 20:22:30 +0100, Orchid XP v7 wrote:
> 
>> Arguably it would be faster to start again from scratch rather than try
>> and learn the OO codebase... :-S
> 
> Doubt it, otherwise new coders coming into the project would never get 
> started (into any project, for that matter).

I always wondered about this... How *do* you get started on a new 
project with millions of lines of code and no documentation?

(I've looked at a couple of such projects, but failed to learn anything 
of use. I just couldn't figure out what the heck any of it is...)


Post a reply to this message

From: Gail Shaw
Subject: Re: Mac Plus vs AMD Dual Core
Date: 24 Oct 2007 16:32:58
Message: <471fabfa@news.povray.org>
"Orchid XP v7" <voi### [at] devnull> wrote in message
news:471fa7b9$1@news.povray.org...
> Jim Henderson wrote:
> > On Wed, 24 Oct 2007 20:22:30 +0100, Orchid XP v7 wrote:
> >
> >> Arguably it would be faster to start again from scratch rather than try
> >> and learn the OO codebase... :-S
> >
> > Doubt it, otherwise new coders coming into the project would never get
> > started (into any project, for that matter).
>
> I always wondered about this... How *do* you get started on a new
> project with millions of lines of code and no documentation?

Usually with the help of someone who knows the codebase and quite a bit of
time. I've done it a couple times. Doesn't really get easier.


Post a reply to this message

From: Jim Henderson
Subject: Re: Mac Plus vs AMD Dual Core
Date: 24 Oct 2007 17:37:34
Message: <471fbb1e$1@news.povray.org>
On Wed, 24 Oct 2007 21:14:54 +0100, Orchid XP v7 wrote:

> Jim Henderson wrote:
>> On Wed, 24 Oct 2007 20:22:30 +0100, Orchid XP v7 wrote:
>> 
>>> Arguably it would be faster to start again from scratch rather than
>>> try and learn the OO codebase... :-S
>> 
>> Doubt it, otherwise new coders coming into the project would never get
>> started (into any project, for that matter).
> 
> I always wondered about this... How *do* you get started on a new
> project with millions of lines of code and no documentation?

You spend lots of time reading code and asking questions.  :-)

Or, what I did, was spend lots of time reading code and asking questions, 
but not as much as a programmer learning to contribute to the project 
would, and just spent my time looking at the pieces I was interested in.

I also came from a practical knowledge background from implementing the 
product, and spent a fair amount of time using source code analysis tools 
to look at call stacks taken from running systems.  Didn't give me a 
comprehensive view of what was going on, but I was able to suggest fixes 
for a couple of issues to the developers that were feasible.

Jim


Post a reply to this message

From: Darren New
Subject: Re: Mac Plus vs AMD Dual Core
Date: 24 Oct 2007 20:38:30
Message: <471fe586$1@news.povray.org>
Warp wrote:
>   So the implicit conversion rules of C for signed and unsigned integers
> are weird? Care to suggest better conversion rules?

No, they make perfect sense, when you consider that they're two 
different ranges of values fit into the same number of bits. I'm merely 
pointing out that the errors you describe comes from treating "int"s as 
"integers". There's no such thing as an "unsigned integer", only an 
"unsigned int".  It was a nit, nothing more. :-)

I.e., the problem isn't the conversion rules, but the fact that people 
code in C without constantly keeping in mind the limitations caused by 
the low-level nature of the values and the lack of error checking.

-- 
   Darren New / San Diego, CA, USA (PST)
     Remember the good old days, when we
     used to complain about cryptography
     being export-restricted?


Post a reply to this message

From: Darren New
Subject: Re: Mac Plus vs AMD Dual Core
Date: 24 Oct 2007 20:47:08
Message: <471fe78c@news.povray.org>
Warp wrote:
>   Having automatic unbounded arithmetic types is fine as long as you don't
> care about efficiency.

Ah yes. The "it's better to be fast than correct" philosophy. It serves 
Microsoft so well, after all. ;-)

>   Integral types which support unlimited precision can *not* be as efficient
> as CPU-register-sized integers

Sure they can. I've used many computers where the unbounded arithmetic 
was just as fast as the bounded arithmetic when you stayed within bounds.

> unless you explicitly tell to the compiler
> that "this variable will always stay within these limits", in which case
> you are already stuck with the same limitation as the C integral variables.

Nope. Ada, for example, allows you to specify an upper size on variables 
and then actually *enforces* it, rather than just failing in bizarre 
ways like leaving you with the sum of two positives being negative. And 
Ada isn't known for its inefficiencies.

> If you don't tell the compiler those limits and it has to make sure that
> in case of overflow it switches to unlimited precision, then those integral
> types simply cannot be as fast as the bounded ones. It's just physically
> impossible.  If nothing else, the compiler will have to add an overflow
> check after each single operation done with those integers, thus adding
> clock cycles and code size (filling code caches faster).

Errr, no. I've used plenty of CPUs that provide for traps on overflow, 
so the normal case is fast and when the value overflows, it traps out 
and switches to the slower bignums rather than giving the wrong answers.

>   I'm also sure that being forced to prepare for unlimited precision math
> makes many compiler optimizations impossible (which would be possible with
> register-sized integers).

Maybe. I would think this is more a CPU design issue than anything. If 
the trap carried enough information, I bet you could handle it in the 
compiler.

>   (Also, in the general case a compiler cannot deduce by examining a piece
> of code that a variable will never have a value outside certain boundaries.
> I'm certain this kind of check would be equivalent to the halting problem.)

Yah, probably. On the other hand, you expect humans to be able to do 
this? If the compiler can't figure it out, neither can the programmer.

-- 
   Darren New / San Diego, CA, USA (PST)
     Remember the good old days, when we
     used to complain about cryptography
     being export-restricted?


Post a reply to this message

From: scott
Subject: Re: Mac Plus vs AMD Dual Core
Date: 25 Oct 2007 02:59:54
Message: <47203eea$1@news.povray.org>
>> Microsoft are not going to employ 50 people for a few months to go 
>> through and optimise for RAM usage just to make you feel better.
>
> Indeed no - their job is to research new techniques for slowing software 
> down as much as possible to boost sales of expensive new hardware. 
> (Presumably this is why the hardware vendors love them so much...)

There job is to make money for the company.  50 people writing Word 2010 
will make more money than 50 people optimising Word 2003.  They can't help 
it, it's all the customers that would prefer paying for a buggy and memory 
hungry Word 2010 compared to a lean and mean Word 2003.

If you want to change soemthing, you need to convince the majority of 
computer users NOT to buy the latest software for MS...  Good luck.

> Now I'm puzzled - when I bought 1 GB of RAM for my PC, I had to pay 
> several hundred pounds for it... Am I living in an alternate reality or 
> something?

You're living in the past :-)  Price of computer stuff goes down pretty 
quickly - it's always surprising if you haven't looked for a while.  I 
bought a 64MB memory stick for £40 a few years back - now I was surprised 
that a 1GB one is under £10.

>>> I mean, 20 *years* ago computers could do that instanteneously with a 
>>> fraction of the RAM and CPU power. Why are we not coding like that any 
>>> more??
>>
>> Because we (well, most of us) have better computers than we did 20 years 
>> ago?
>
> And that's just it, isn't it?
>
> Why bother fixing the problem when you can just throw more hardware at it.

I think it's more the case of the software writers taking advantage of the 
hardware improvements.  If MS were still only offering an uber-streamlined 
version of some old Win NT to run on our 3 GHz dual-core machines, I think 
Linux and MacOS would be doing pretty well :-)


Post a reply to this message

From: scott
Subject: Re: Mac Plus vs AMD Dual Core
Date: 25 Oct 2007 03:04:18
Message: <47203ff2$1@news.povray.org>
> I'm still surprised I can get a shaded textured 3D scene with shadows 
> calculated refreshed faster than my monitor sync rate, but PowerPoint 
> can't smoothly scroll text onto the screen without tearing it. :-?

Is that on XP? - I think that's because in the XP desktop you can't redraw 
in sync with the monitor.  This is fixed in Vista because (IIRC) everything 
is double-buffered before being shown on the screen, just like in a 
full-screen game that uses the 3D card.


Post a reply to this message

From: Warp
Subject: Re: Mac Plus vs AMD Dual Core
Date: 25 Oct 2007 07:14:00
Message: <47207a78@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> I'm merely 
> pointing out that the errors you describe comes from treating "int"s as 
> "integers". There's no such thing as an "unsigned integer", only an 
> "unsigned int".  It was a nit, nothing more. :-)

  I didn't understand that.

-- 
                                                          - Warp


Post a reply to this message

From: Warp
Subject: Re: Mac Plus vs AMD Dual Core
Date: 25 Oct 2007 07:28:54
Message: <47207df5@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> >   Integral types which support unlimited precision can *not* be as efficient
> > as CPU-register-sized integers

> Sure they can. I've used many computers where the unbounded arithmetic 
> was just as fast as the bounded arithmetic when you stayed within bounds.

  The only way for that is that the CPU has explicit support. In other
words, the CPU itself makes the bound checks at no additional cost in
clock cycles instead of the compiler having to add additional opcodes
which perform the checks.

  AFAIK x86 processors do not have such a feature. The only thing an integer
overflow will do is to set a flag, which can then be checked with additional
opcodes, at the cost of additional clock cycles.

> > unless you explicitly tell to the compiler
> > that "this variable will always stay within these limits", in which case
> > you are already stuck with the same limitation as the C integral variables.

> Nope. Ada, for example, allows you to specify an upper size on variables 
> and then actually *enforces* it, rather than just failing in bizarre 
> ways like leaving you with the sum of two positives being negative. And 
> Ada isn't known for its inefficiencies.

  This would require even more CPU support than simply checking for a
register-sized integer overflow, as you would have to check if the value
goes out of arbitrarily-set boundaries (instead of just overflowing or
underflowing over). In other words, you would have to be able to tell
the CPU, at no clock cycle cost, "if this register ever gets a value
smaller than this or larger than this, throw an exception". I have hard
time believing any existing CPU has such a feature.

  With normal CPUs the compiler would have to put a comparison and a
conditional jump after each single operation done to the variable, at the
cost of additional clock cycles. (Such a conditional jump might even mess
up the CPU's branching prediction logic, making it even more inefficient.)

  Unless you give me an understandable and logical explanation of how these
kinds of checks could be implemented without making the code slower, I just
cannot believe it's possible.

> Errr, no. I've used plenty of CPUs that provide for traps on overflow, 
> so the normal case is fast and when the value overflows, it traps out 
> and switches to the slower bignums rather than giving the wrong answers.

  I must admit that I'm not 100% sure if the x86 architecture supports
integer register overflow exceptions, but I'm quite certain it doesn't.

  Sure, there are some other CPUs which do, but in practical terms that
doesn't help the average programmer too much.

-- 
                                                          - Warp


Post a reply to this message

From: Orchid XP v7
Subject: Re: Mac Plus vs AMD Dual Core
Date: 25 Oct 2007 14:18:00
Message: <4720ddd8@news.povray.org>
scott wrote:

> There job is to make money for the company.  50 people writing Word 2010 
> will make more money than 50 people optimising Word 2003.  They can't 
> help it, it's all the customers that would prefer paying for a buggy and 
> memory hungry Word 2010 compared to a lean and mean Word 2003.
> 
> If you want to change soemthing, you need to convince the majority of 
> computer users NOT to buy the latest software for MS...  Good luck.

Well, I don't stand a chance against the M$ marketing machine. Even 
Apple doesn't - and they have money.

Sadly, M$ has managed to convince the general population that it is 
"normal" for computers to not work propperly. If you bought a washing 
machine and it didn't work properly, you'd take it back and demand a 
refund. But when people buy a computer and the software on it doesn't 
quite work properly, people just think this is "normal" and 
"acceptable". This, truely, is M$'s contribution to the field of 
computer science.

(It really makes me angry that M$ are allowed to broadcast adverts on TV 
telling everybody how "good" they are. In my mind, this should be 
illegal under the trade descriptions act. But anyway...)

>> Now I'm puzzled - when I bought 1 GB of RAM for my PC, I had to pay 
>> several hundred pounds for it... Am I living in an alternate reality 
>> or something?
> 
> You're living in the past :-)  Price of computer stuff goes down pretty 
> quickly - it's always surprising if you haven't looked for a while.  I 
> bought a 64MB memory stick for £40 a few years back - now I was 
> surprised that a 1GB one is under £10.

I *was* going to sell my old CPU on ebay. I mean, it's a moderately old 
now, but I paid about £250 for it when I got it.

However, this was before I discovered that you can buy it new (exact 
same model, clock speed, socket, everything) for £21.

£21. Retail boxed. With a warranty.

Who the hell is going to buy a second hand one?

>> And that's just it, isn't it?
>>
>> Why bother fixing the problem when you can just throw more hardware at 
>> it.
> 
> I think it's more the case of the software writers taking advantage of 
> the hardware improvements.  If MS were still only offering an 
> uber-streamlined version of some old Win NT to run on our 3 GHz 
> dual-core machines, I think Linux and MacOS would be doing pretty well :-)

There's a difference between "taking advantage of" and "wasting".

Do you even remember when WinXP first came out? And how everybody has 
utterly horrified at the minimum hardware requirements to make it 
function acceptably? It's been around so long now that everybody seems 
to have forgotten that XP takes four times as much hardware to do the 
same thing as older OSes managed to do quite happily...

(And then there's the sad fact that M$ doesn't know the difference 
between "operating system" and "entertainment system". Even in the "pro" 
version of XP, you still get lots of silly toys like games and video 
players and so forth that I have to spend ages uninstalling. Surely what 
most businesses actually want is a tiny OS to run their *real* 
applications on top of...)


Post a reply to this message

From: Warp
Subject: Re: Mac Plus vs AMD Dual Core
Date: 25 Oct 2007 17:29:37
Message: <47210ac1@news.povray.org>
Orchid XP v7 <voi### [at] devnull> wrote:
> Sadly, M$ has managed to convince the general population that it is 
> "normal" for computers to not work propperly. If you bought a washing 
> machine and it didn't work properly, you'd take it back and demand a 
> refund. But when people buy a computer and the software on it doesn't 
> quite work properly, people just think this is "normal" and 
> "acceptable". This, truely, is M$'s contribution to the field of 
> computer science.

  To be fair, though, there's no such a thing as a bug-free (production
scale) operating system or software. All major operating systems during
the history of computing have had security and bug patches and upgrades.

  Sure, some operating system have annually more security holes discovered
than others. However, big part of it is due to the popularity of those
operating systems. More popular -> more people use it -> more bugs are
discovered and more people hack those systems. Obscure unix-flavored
operating systems used in some obscure mainframes at the cellar of a few
dozen of obscure companies surely have also quite many security holes,
but they are not discovered because not many people use them nor try to
hack them.

  OTOH, I must admit that there are some operating systems which, while
being relatively popular, have also surprisingly low security hole counts.
MacOS X is a good example. FreeBSD is also probably such an OS. Linux does
not score so well in this scale, but that's, again, at least in part due
to the popularity of linux among hackers. (IOW it may appear as linux had
more security holes than eg. FreeBSD, but that may be in part caused because
not so many people try to hack FreeBSD as Linux. In a way, this is actually
a good thing for Linux because more security holes are discovered and
patched that way.)

> Do you even remember when WinXP first came out? And how everybody has 
> utterly horrified at the minimum hardware requirements to make it 
> function acceptably? It's been around so long now that everybody seems 
> to have forgotten that XP takes four times as much hardware to do the 
> same thing as older OSes managed to do quite happily...

  I wonder if you could even install XP in a 386, in any shape or form.
Any modern linux distro should be installable in a 386. Even X might work
if you use a superlight window manager, so you will not even be confined
to the command prompt.

  (Why would anyone even want to install linux in a 386? Well, if you
have one laying around, it makes a supercheap firewall or small-scale ftp
server, for instance.)

-- 
                                                          - Warp


Post a reply to this message

From: Jim Henderson
Subject: Re: Mac Plus vs AMD Dual Core
Date: 25 Oct 2007 19:19:35
Message: <47212487@news.povray.org>
On Thu, 25 Oct 2007 17:29:37 -0400, Warp wrote:

> Any modern linux distro should be installable in a 386.

Should be, but many aren't because the installation kernels are compiled 
for Pentium or later processors.

(Spent time doing such an install - put the hard drive in a "modern" 
computer for the install, then moved it back to the 386)

Oh, and on the security front, NetWare pre-4.x.  IIRC, not one security 
patch ever needed to be issued, and it was very widespread back then (2.x 
and 3.x days).

Jim


Post a reply to this message

<<< Previous 50 Messages Goto Latest 50 Messages Next 50 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.