From: jpwoodruff@irisinternet.net (John Woodruff)
Subject: Re: Singular Value Decomposition (SVD) Ada Algorithm
Date: 5 Nov 2004 21:23:17 -0800
Date: 2004-11-05T21:23:17-08:00 [thread overview]
Message-ID: <34defe4d.0411052123.49702f47@posting.google.com> (raw)
In-Reply-To: 35f054ea.0411010817.52bbf8fc@posting.google.com
aschwarz@acm.org (skidmarks) wrote in message news:<35f054ea.0411010817.52bbf8fc@posting.google.com>...
> > <...> I developed a doubly-linked list.
<...>
I guess since I might have induced you to show us your thinking, it's
proper I offer my remarks.
> 1. Optimization of data via generics was avoided. All data is 32-bits.
> The rationale is:
> a. If size optimized and packed, more instructions are required
> during operation for (un)packing operations, which increases
> total size, and with more instructions there is decreased
> performance.
> (The size is relative and depends on use. Performance is bad.)
> b. If size optimized and unpacked, then depending on the CPU, slack
> bytes are added which increases the size.
> c. By making all sizes the same, the issue becomes movement into
> and out of the fixed size datum field.
Let me say that I have no idea what requirements you're working to.
If you're working in a context with a few tens of kilobytes of memory,
or with a 100 Khz processor, or the like, I can sympathize with your
effort to crowd every last particle of performance.
However in my own life, I have stuck with an aphorism on the topic of
optimization that I picked up 30 or so years ago:
There are two guidelines for micro-optimization:
-- Don't do it
-- Don't do it yet.
<...>
> The final result is that there
> is a division of responsibility which (I believe) provides an adequate
> level of encapsulation and information hiding while giving some
> application level conveniences.
My thought is that you have not encapsulated quite as much as you
might have done. At the outset, you said "All data is 32-bits". But
I can think of *a lot* of data that don't comply. And your list
handler doesn't cover those. So someday you might need to repeat the
effort you expended in order to build a new one. Or, even worse, you
or your successor will forget the restrictions and reuse your list
manager with a non-32bit-compliant component, and the result might not
be pretty.
My committment to software engineering was (before I retired) to try
to leave lasting artifacts that will function for *decades* in
evolving service. The tactics that Ada promotes helped me do that, I
think. Other folks have other goals, I guess
> There is always room for comment and architectural changes. A dialog
> will always be appreciated.
>
I enjoy the occasional dialog!
John
next prev parent reply other threads:[~2004-11-06 5:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-29 17:18 Singular Value Decomposition (SVD) Ada Algorithm skidmarks
2004-10-29 19:14 ` Jeffrey Carter
2004-10-30 16:54 ` John Woodruff
2004-10-31 6:59 ` skidmarks
2004-10-31 18:01 ` John Woodruff
2004-11-01 16:17 ` skidmarks
2004-11-06 5:23 ` John Woodruff [this message]
2004-11-06 19:28 ` Jeffrey Carter
2004-11-09 17:16 ` skidmarks
2004-10-30 19:08 ` Gautier Write-only
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox