Aceshardware

(not so) temporary home for the aceshardware community
 FAQ •  Search •  Register •  Login 
It is currently Thu Dec 17, 2009 8:30 am

All times are UTC + 1 hour



Welcome
Welcome to <strong>Aceshardware</strong>.

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, <a href="/profile.php?mode=register">join our community today</a>!


Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: bits vs. ints
PostPosted: Fri Oct 16, 2009 4:52 pm 
Offline

Joined: Sat Jul 28, 2007 4:03 am
Posts: 77
Hi people.

I have a program that uses ints, but the numbers are guaranteed to be very, very small numbers (in the range of 0-3 or 0-19 or something like that)

Would changing around this program to use bytes and bitwise operators instead of ints and integer operators result in a performance increase? When the program runs for a long time, it uses a lot of memory. I imagine with smaller data types and "simpler" operations, the performance increase would be noticeable/significant. The program is only a few hundred lines of code, and looking at different ways of speeding things up in software, before we try porting to hardware. We're looking at using x86 and/or x86-64, as those are the systems most available to us.

Thanks,
Joe


Top
 Profile  
 
 Post subject: Re: bits vs. ints
PostPosted: Fri Oct 16, 2009 6:25 pm 
Offline

Joined: Fri Aug 17, 2007 2:55 pm
Posts: 357
If you move to bytes and if your algorithm has lots of parallelism you should see large speed ups over ints (4x). Even without packed SSE you still may see gains due to reduced cache pressure. It is it only .4K it shouldn't be that hard to try the quick conversion of the scalar path.


Top
 Profile  
 
 Post subject: Re: bits vs. ints
PostPosted: Fri Oct 16, 2009 11:19 pm 
Offline

Joined: Sat Jul 28, 2007 4:03 am
Posts: 77
Ok, thanks plenty. This is going to be an exercise for me in tweaking code to make use of inherent CPU parallelism and probably some vector operations.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: