Re: playout garbled in iPhone 3.x Release build (solved)
Re: playout garbled in iPhone 3.x Release build (solved)
- Subject: Re: playout garbled in iPhone 3.x Release build (solved)
- From: Kyle Sluder <email@hidden>
- Date: Mon, 3 May 2010 10:39:02 -0700
On Mon, May 3, 2010 at 10:28 AM, Tim <email@hidden> wrote:
> No, this was code I had not planned on touching. I was just trying to make
> a more general point. With the rapid increase in CPU speeds we have seen
> over the last 20 years it is common to encourage more abstraction without
> regard to performance. I don't disagree with that in theory, as better
> abstractions will let other people build the tools that better optimize
> performance. But, it can go too far. E.g., today's www can be a painful
> experience on a desktop machine that is more than ~5 years old, and today's
> mobile devices have capabilities similar to what we saw on the desktop in
> the mid 90's. And, even as the mobile processors get faster each year we
> will always be up against power consumption. So, I don't plan on changing
> my general performance orientation, even if it is sometimes misallocated
> effort. I have likewise seen misallocated effort and bugs created by too
> much focus on code abstraction and generality.
Oh, I'm certainly not advocating needless abstraction, particularly in
cases such as yours, where performance is critical to the function of
the system. But so is correctness; code that produces incorrect
results quickly is worthless. You've gotten lucky so far that your
incorrect code has produced correct results. I'm not suggesting you
should adopt a layer of abstraction
(BitShiftFactoryFactoryImplementationAdapter, anyone?) but rather
express your intent directly to the compiler. If anything, you're
removing a layer of abstraction by describing your bit-twiddling in
terms of bit-twiddling rather than arithmetic, and you would remove a
further layer of abstraction by skipping the C compiler altogether.
As for not planning on touching certain code, there's a difference
between refactoring and needless reimplementation. Refactoring is
rewriting poor code to make it better, and is a necessary part of the
software lifecycle. There is no such thing as frozen code.
As always, just my 2¢.
--Kyle Sluder
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden