Compilers
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Web Development Archives FAQs Compilers

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Web Development Archives Sponsor:
  #1  
Old June 17th, 2008, 06:40 PM
sandyasm
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
recognition and optimization of prefix computation or variants in C/C++ compilers

Hi,

Does the current C/C++ compilers in industry recognize idioms of the
form of prefix computation and transform them? For instance, given

for (i = 0; i < n; i++)
for (j = 0; j < i; j++)
result[i] = result[i] + a[j];


transform this to

result [0] = a[0];
for (i = 1; i < n; i++)
result[i] = result[i-1] + a[i];

If so, under what class of optimizations do they do this?

In the general case, a similar prefix pattern can be identified and
seen in certain search/traversal algorithms also. Do the existing
compilers handle any of those as well?


Reply With Quote
Reply

Viewing: Web Development Archives FAQs Compilers > recognition and optimization of prefix computation or variants in C/C++ compilers


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway