PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

XSCALE optimizations finally

Anyone hear the news about intel optimizing code for the XSCALE? I just read it somewhere.

evc 4.0 coming with XSCALE compile options?

Still hoping that I can justify getting the xscale
But am I mistaken in thinking that you can't use EVC4 for PPC2K2 apps? Still, very cool.
UMCP_matt · 15 Aug 2002, 17:19 UTC — thats fine with me
I am happy to start using c#.net rather than c++
eVC 4.0 is for WinCE.NET, not PocketPC2002. CE.NET will take the place of PPC2k2 so iPaq might offer an upgrade like they did to PPC2k2.
Planned obscelence. (sp?)

I believe it exists in the PDA market. It would be a great marketing move to release new devices, claiming a SIGNIFICANT SPEED INCREASE!!! in all programs running the BRAND NEW WindowsCE.net OS.

CE3 to CE3.1 (2k2) wasn't exactly a big jump. So while it's possible, I'm not sure if Compaq will be rushing to get it out.
Well if they don't release an upgrade then it better be atleast 8 months before WinCE.NET comes out or I will not be happy.

They did OS upgrades before, they can do it again as far as I'm concerned.
Hi,

The "new" Microsoft ARM compiler shipped with eVC++ 4.0 can be used with eVC++ 3.0 to produce XScale optimised code. Switching on full XScale optimisation results in an executable that runs about 10% faster on the XScale (and crashes on the StrongARM). Unfortunately this compiler has SERIOUS performance issues, and generates code which runs at about 50-60% of the speed of the original eVC++ 3.0 ARM compiler (on ARM and XScale)...

Well, it's been 3 years now and Microsoft still hasn't managed to produce an optimised working ARM compiler (although they did manage for x86, MIPS and SH3/4). And now they've switched the whole platform to ARM only!!!

Has anyone ever tried to get GCC to build an ARM Win32 executable?

Later,

Box Pawta
LOL, the MIPS compiler, better than ARM's compiler? You must be joking!
Well, the software that I've written can be compiled with full optimisations switched on for all CPU/OS combinations apart from anything running on ARM. Then it's a case of arsing around with individual files' optimisation settings to get a (sort of) working build... And then the ARM executables run much slower than they should (as half the optimisations are turned off)...

Later...
Hmmm, this whole ARM/XScale business seems to be a bit of a mess. Specially when you read this:

http://www.cewindows.net/faqs/pocketpcstaving.htm

Looks like the current ARM/XScale PDA's have a performance limit of 25Mhz (worst case, aka. exactly as it is in the real world ;)

Maybe next time...

Later...
GreyWolf Ghost · 17 Aug 2002, 01:40 UTC
MooseMaster wrote:
LOL, the MIPS compiler, better than ARM's compiler? You must be joking!


Things that make you go Hummmmmmmmmmmmmmmmmmmm!!
have a performance limit of 25Mhz


<Yawn> Troll.

I'm not sure about the logic the guy is using:

StrongARM and XScale processors execute 32 bit instructions


Last time I checked, 32 bits = 4 bytes.

We need to read in 8 bytes of data before executing the instruction. Given that our maximum bus speed is 200 megabytes per second, we can only execute 25 million instructions.


8 bytes? No. If he's talking about filling the pipeline, maybe, but after it's full it will read them in one instruction at a time...

In the RISC processor, each 32 bit instruction also has 32 data along with it.


Ehrrrr, it has *what*?

Cheers,

Ref.
Hmmm...

Well I'm interested to hear any other explanation of why there is little (10%) to no (0%) speed improvement when running processor-intensive ARM4 code on current devices with a 400Mhz XScale as opposed to a 206Mhz StrongARM for large "real-world" applications (ie. not synthetic benchmarks which may be able to fit into the processor cache).

BTW. ARM4 instructions are 32bits (4 bytes) with 0-4 bytes of data. A 4 byte instruction with 4 bytes of data is a "worst-case" scenario. Both the author of the (quoted) article and myself were quoting 25 million instructions per second as a "worst-case" scenario. If you've spent any time programming computers, you will acknowledge that "real-world" cases are much closer to "worst-case" scenarios than "best-case" scenarios.

Regardless of the number of hairs split, none of this changes these facts:

1) Microsoft's ARM/XScale compiler is (provably) buggy and unoptimised.
2) Current (Microsoft Windows CE or Pocket PC) PDA designs (16 bit memory bus running at 100Mhz) do not (technically) take full advantage of the performance possible from the StrongARM or XScale processors.
3) Optimising a future release of Windows CE (or Pocket PC or CE.NET if you prefer one of those names) for XScale will (obviously) have no effect on (1) or (2). Of course the optimisations would have an effect on (2) if Microsoft manage to fit the entire OS into the (32Kb) processor cache (LOL).

Later...

PS. None of this is intended as a personal slander against anyone who owns a device with an ARM or XScale processor, so please don't take it that way.
Apologies if the above post(s) (and indeed this post too) seems a bit disgruntled... I've been wainting for a very long time for MS to come out with a decent ARM compiler and now the latest (bundled with EVC++ 4) is a step backwards, or at best, a step sidewards.

I have been in contact with other (commercial) software developers and OEMs that have similar problems with the MS ARM compilers. I've even been in contact with (supposedly) pertinent people within MS, and still to this day, even after trying many versions of this compiler, have not found one that works properly.

How can it be possible that they can consider switching the entire OS to be ARM-only when they don't even have a decent compiler yet? As the only solution to the bugs in the ARM compiler is to switch off optimisations for some modules, this means that portions of the OS, drivers and applications are not properly optimised for any type of ARM chip. The (optimisation) problems with the ARM compiler have been present since it became available initially, several years ago.

Now, the latest (EVC++ 4) ARM/XScale compiler does not exhibit the problem with optimisations, because they have turned them off inside the compiler (you can verify this by comparing the size and performance of an executable generated with the EVC++ 3 ARM compiler with optimisations turned off against an executable generated with the EVC++ 4 ARM compiler with full optimisations turned on). That means that it isn't possible to generate properly optimised C++ code with the new "optimised" compiler at all! The new compiler typically produces code that runs at about 60% of the speed of the previous compiler.

So, maybe next year they'll make new devices with 32-bit memory buses, at the same time that they release CE.NET. The new devices won't be able to be "downgraded" to Windows CE3 (Pocket PC), and CE.NET probably won't be available for older devices. Applications will run up to twice as fast on the new platform (thanks to the double-sized memory bus). Microsoft will say that this is because CE.NET is so much more wonderful (and optimised for XScale too!), and no-one will be the wiser... You can be sure that they won't be using the EVC++ 4 ARM compiler to build CE.NET though!

I guess they'll have to kill me now. Nah, they'll probably just assume that everyone thinks I'm a babbling idiot and ignore me...

Later...
(This isn't a personal attack either).

ARM4 instructions are 32bits (4 bytes) with 0-4 bytes of data.


Oh, ok, I see what you're saying. So we're ignoring registers, for the sake of worst-caseness. Fair enough. In that case, we may as well pretend that the processor has an unrolled loop of LDMIAs using lots of registers (let's say 12 registers = 48 bytes/instruction :? ), that way it'll both thrash the cache and stall the processor.

The lack of speed gain, is, to my knowledge, because of the "different" implementation of the ARM instruction set. Of course the instructions are (largely) the same, but there're are different pit-falls (for want of a better word) on the XScale against the "straight" ARMs. If the XScale runs code written/compiled for a StrongARM, it's simply not going to run well because even (simple) things like the parameter stacking take longer on the XScale.


However, I largely agree with you:
1) Microsoft's compiler is pretty poor. It *really* should allow in-line code.
2) 16-bit memory?
The iPAQ's specification disagrees:

The iPAQ H3600 contains 2 SDRAM chips configured as a 32 bit wide memory bus.


But yes, obviously using faster RAM would improve performance. Still, I don't think that the number of cache misses will be that high, even in "real" use. When I get an XScale device I'll have a look at the performance counters and find out properly :)

Still, the argument is moot until RAM goes at the same speed as processors (effectively making all system RAM a cache)... which will never happen. At some point, the vendors have to choose the type of memory + bus they want, and price is very important in a market as cut-throat as the PPC one.

3) Microsoft don't need to fit the OS into 32KB. The main kernel of the OS that's in "constant" use will be small. The rest can live out in RAM. Again, I wouldn't think that the kernel itself is thrashing the cache.


Personally, I think that as well as MicroSoft screwing up a bit with the compiler side of things, Intel haven't done anybody any favours with the XScale. Sure it's "compatible", but it means that it needs supporting/optimising separately to the rest of the ARM processors. I'd be very happy if a competitor started knocking out high-quality ARM10s (Samsung have made one that does >1GHz, IIRC) and they were used instead of XScales.

Cheers,

Ref.
I have a feeling that if PDA developer (hardware wise) wanted to take the market by storm, it would be done through linux. If you use linux, nearly all restrictions that were imposed by MS will be gone (there may be no restrictions at all). That includes the processor type, the form factor, and a load of other, not so ovious items. Here is the catch though, in order to be truely effective, they should offer way to use the PocketPC2002 OS. For instance, a download from their site. I have a feeling that MS's regulations mainly apply to devices being sold with the PocketPC2002 OS preinstalled. However, if a company wants to pay for the os, and give customers a chance to switch, I bet they wouldn't have a problem, since it would allow them to claim a larger portion of the market.

Sorry if this doesn't make much sense, it does in my mind, but I got to bed really late last night, and didn't get much sleep.
The main problem is that most people want ease-of-use in a PDA, and a GUI that they understand. If you offer "normal" people the choice of a PDA with a Linux version on it, and a GUI that's like their PC at home (i.e. Windows), Joe Average consumer is going to take the Windows device.

At the moment, I believe that GUI-wise, and usability-wise (ignoring "expert" users), the PocketPC OS is far better for average consumers.

Linux is more stable for things like servers, and it is truly a nice server/desktop OS... but GUI usability-wise? Sorry, it's nowhere near Windows, and in a "limited" environment like a PDA screen, GUI usability ranks very highly.

Cheers,

Ref.
Refractor have you ever used the Sharp Zaurus' Linux/Java OS? That OS is faster than PPC2k2, and it's much easier to use and more "Windows" like than the PocketPC OS with it's "Today" screen, funky start menu, and messed up filing system.
refractor wrote:
But yes, obviously using faster RAM would improve performance. Still, I don't think that the number of cache misses will be that high, even in "real" use. When I get an XScale device I'll have a look at the performance counters and find out properly :)
Refractor, would you like me to run any tests on my iPaq H3955?
Nope, I've not seen or used the Zaurus. :(

I can't give you any tests to run either, 'cos it'd need some low-level hackery to address the performance counters in the processor, and I wouldn't want to give you untested code that went that "deep" in case it trashed anything.

Thanks anyway though. :)

Cheers,

Ref.
Agreed, a decent arm compiler would be nice... But I personally think that the disappointing Xscale performance has the potential to be a much bigger issue to PPC/MS than first thought:

Palm has been moving towards a migration to the ARM architecture for some time, namely StrongARM. However, if they are watching the PPC industry closely, they will have no doubt noticed these recent Xscale issues and learnt a lesson from it. Palm has not yet committed to an actual release of an ARM device. Even if they were poised on the verge of releasing a SA device, it would still be a wise decision imho to delay a release, in favour of jumping straight in with Xscale. They don't have the StrongArm legacy of the PPC to contend with, so developers can start afresh with the V5 Xscale instruction set, thus 'leapfrogging' the competition with a PDA with far more potential than current Xscale PPCs. I.e 400mhz+ used properly - Loyalties aside, I'd buy an Xscale Sony Clie in a heartbeat...
I would still rather they completely bypassed the XScale, and implemented the later ARMs with:

Jazelle (on-board Java bytecode->ARM translator to run Java "natively")
Thumb
The SIMD instructions, whatever they are called (I forget)

That way, the "odd-ball" XScale can die a quick death and we'd still only have one real platform to deal with (existing StrongARM/ARM code should work nicely on the ARM10s, etc, I believe, whereas it doesn't work nicely on the XScale).

Dividing the single existing ARM base into:
ARM + StrongARM
and
Intel XScale ARM

is a very bad thing, IMHO (from a developer's point of view at least). I'd be happy if the XScale crawled into a corner and died quietly (very selfish, but there you go).

(I may be talking out of my arse, 'cos I haven't actually investigated the ARM10, etc, much).

Cheers,

Ref.
I agree, that would be a preferable solution (assuming there aren't other issues with ARM10 like compatibility, power-consumption, etc etc)

Given Intel's dominance though, I wouldn't hold my breath.. Didn't know about later ARMs with simd & native java though, seems a little surprising they haven't got more exposure and consideration in mobile devices.
http://www.arm.com/news/ARM112904

Snippet from above URL:

Applications
The ARM11 microarchitecture is particularly suited to next-generation wireless and consumer devices, where high levels of system performance and low-power consumption are required. These include 2.5G and 3G mobile phone handsets, PDAs and multimedia wireless devices, home consumer applications such as imaging and digital camera applications. The microarchitecture is also designed to meet the needs of home gateway and network infrastructure equipment including voice over IP and broadband modems.

Technical details
The new ARM11 microarchitecture implements the ARMv6 instruction set architecture that includes the Thumb® extensions for code density, Jazelle™ technology for Java™ acceleration, ARM DSP extensions, and SIMD (Single Instruction Multiple Data) media processing extensions.

High performance is delivered using an 8-stage integer pipeline, static and dynamic branch prediction, and separate load-store and arithmetic pipelines to maximize instruction throughput. The ARM11 microarchitecture will deliver 350 to 500+ MHz worst case on 0.13u foundry processes, and over 1 GHz on next-generation 0.1µm processes. The ARM11 microarchitecture achieves optimum power efficiency single-issue operation with out-of-order completion to minimize gate count, consuming less than 0.4 mW/MHz on 0.13u foundry processes.

Multimedia performance is accelerated through the enhanced integer pipeline, new SIMD media instructions, high-performance 64-bit memory system, and hardware support for unaligned data access. Real-time performance is enhanced by using vectored interrupts, and low-interrupt-latency operating modes which, together with ARMv6 architecture enhancements, reduce interrupt handling overhead by 70 percent.

The new ARM11 microarchitecture also provides considerably improved operating system performance by use of physically addressed caches, and new ARMv6 architecture instructions that accelerate context switching. The ARM11 microarchitecture was developed in close consultation with leading operating system vendors and supports the WindowsCE, Symbian OS, Palm OS, and Linux operating systems.

Availability
The first CPU using the ARM11 microarchitecture will be publicly announced and released to licensees in Q4 2002.



Cheers,

Ref.
Well I'm sold. Time to start saving my money again.