Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Assembly x86 > Re: optimizatio...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 10 of 13 Topic 4621 of 4729
Post > Topic >>

Re: optimization possibilities...

by "Chris Thomasson" <spamtrap@[EMAIL PROTECTED] > Apr 19, 2008 at 12:41 PM

"Alexei A. Frounze" <spamtrap@[EMAIL PROTECTED]
> wrote in message 
news:45fb62be-cae7-492a-81b1-4ca933227a45@[EMAIL PROTECTED]
> On Apr 18, 5:30 pm, "Chris Thomasson"  <spamt...@[EMAIL PROTECTED]
> wrote:
>> Before I convert this code into AT&T syntax for GAS to assemble, and to

>> MASM
>> I was wondering if there are any possible optimizations I can perform
on 
>> the
>> following code, I will show the C header first:
>
> Are you sure your performance problem is here and not elsewhere?

I just wanted to know if I could gain some optimizations in the assembly
it 
self before I translate it into AT&T syntax...




> If
> you have a serious resource contention in your application, squeezing
> a few cycles out of the lock/queue primitives will be of little help.
> If you profile your application and see that it spends too much time
> in these primitives compared to the rest of the useful work it's
> doing, then you should think of ways to restructure the application,
> the components and their interaction to minimize this.

Great advise. I am always thinking of ways to reduce contention. However,
I 
need to use non-blocking operations in certain scenarios, one of those
being 
signal-handlers. It helps when your synchronization operations are 
asynchronous reentrant signal-safe. Also, I find that non-blocking 
algorithms tend to scale better than their lock-based equivalents. One 
example would be a wait-free single-producer/consumer unbounded FIFO 
data-structure. This can be implemented without using any interlocked RMW 
operations or explicit memory barriers on the x86. A sample implementation

can be found here:

http://appcore.home.comcast.net

I find that a clever marriage between careful lock-based and non-blocking 
programming techniques can usually yield optimal results.
 




 13 Posts in Topic:
optimization possibilities...
"Chris Thomasson&quo  2008-04-18 17:30:10 
Re: optimization possibilities...
Terje Mathisen <spamt  2008-04-19 07:30:55 
Re: optimization possibilities...
"Chris Thomasson&quo  2008-04-19 14:06:11 
Re: optimization possibilities...
Timothy Baldwin <spam  2008-04-19 11:40:51 
Re: optimization possibilities...
"Chris Thomasson&quo  2008-04-19 12:27:17 
Re: optimization possibilities...
Timothy Baldwin <spam  2008-04-22 20:36:39 
Re: optimization possibilities...
"Chris Thomasson&quo  2008-04-22 16:58:52 
Re: optimization possibilities...
"Chris Thomasson&quo  2008-04-19 16:53:01 
Re: optimization possibilities...
"Alexei A. Frounze&q  2008-04-19 00:15:30 
Re: optimization possibilities...
"Chris Thomasson&quo  2008-04-19 12:41:01 
Re: optimization possibilities...
"Alexei A. Frounze&q  2008-04-20 02:12:38 
Re: optimization possibilities...
"Chris Thomasson&quo  2008-04-20 11:33:37 
Re: optimization possibilities...
"Chris Thomasson&quo  2008-06-10 23:30:33 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 15:00:24 CDT 2008.