Virtual PC on the G4 doesn't swap bytes, rather it switches the endianness
of the PowerPC chip itself, from big to little endian on the fly. (the G5
was the the first PowerPC chip that could not run in either big or little
endian mode).
As for the the answer to the original question: "doesn't it make more sense
to design new, proprietary file formats to use little endian instead of
big?"
The answer is clearly "no". It does not make sense to design new,
proprietary formats, especially those with an endian-ness bias. Use a
standard format instead, like XML.
Greg
On 1/21/06 2:41 AM, "Laurence Harris" <email@hidden> wrote:
> On 1/21/06 4:23 AM, John Stiles didst favor us with:
>
>> Rosyna wrote:
>>>> there are lots of integer values in it that will need swapping, potentially
>>>> hundreds of thousands of them for a single file, so I thought I should pick
>>>> the format that's most likely to be native in the future. Some speculation
>>>> is pretty much unavoidable here.
>
>>> I'm designing a new file format and the nature of the data is such that
>>>
>>> But won't doing that for older machines create a huge performance
>>> burden that they may not be able to handle?
>
>> Let's keep some perspective here. G4s and G5s aren't complete dogs. They
>> can run Virtual PC and emulate WinXP at a passable speed (and the G5
>> really is doing all the byteswapping on the CPU). Imagine how many
>> byteswaps per second that bad boy's doing. I don't think a few million
>> byteswaps during a file load will affect much of anything.
>>
> I'm testing this with HostToLittle and it seems to perform fine on a G4. I
> just figured it makes sense to eliminate the swapping as time goes on rather
> than do more of it. I'll probably do some tests to compare swapping and
> non-swapping to see if I can measure a difference.
>
> Larry
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Carbon-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/carbon-dev/email@hidden
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden