[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Speed in Languages and Browser Architectures

  • From: Rick Marshall <rjm@z...>
  • To: Peter Hunsberger <peter.hunsberger@g...>
  • Date: Tue, 06 Mar 2007 08:29:07 +1100

Re:  Speed in Languages and Browser Architectures
I used to do tricks like that, but the modern optimisers are so good I 
don't even declare C variables as registers any more. In fact it seems 
anecdotally at least that most modern optimisers work better if I don't 
try to force variables into registers. Old PDP habits die hard....

Peter Hunsberger wrote:
> On 3/2/07, Rick Marshall <rjm@z...> wrote:
>> String processing in C is tricky at best. Why? well there's no such
>> thing as a string in C...
>>
>> So Dennis decided a string was an ascii sequence of bytes terminated by
>> a 'NUL' (and not containing a NUL). This has lots of limitations and
>> over the years the definition and libraries have changed - but string is
>> a library, not a language concept.
>>
>> Then to confound the issue most modern C compilers take advantage of
>> native string processing instructions in modern CPUs so many elements of
>> the standard C string library are actually compiled into single CPU
>> instructions (yeah I know the microcode does lots of instructions).
>
> But of course you're not really done optimizing until the code is
> conditionally compiled to exploit the differences in the performance
> of various CPU implementations at the microcode level....
>
> I've actually been involved in writing core OS memory and cache
> management routines where we played such games; certain CPUs can be
> slower on certain instructions so that using multiple instruction
> equivalents can perform better.  We also played games like manually
> pipelining the instruction set to eliminate consecutive register
> access, etc. on some CPUs.  Can't imagine anyone really engaging in
> such practices any more?
>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.