Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.arch.embedded > #26767
| From | Don Y <blockedofcourse@foo.invalid> |
|---|---|
| Newsgroups | comp.arch.embedded |
| Subject | Re: Portable Assembly |
| Date | 2017-06-13 21:57 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <ohqfgq$5fo$1@dont-email.me> (permalink) |
| References | (11 earlier) <d6vojctkngntqipi1dctbqdta93bbsitl6@4ax.com> <ohirtc$c3l$1@dont-email.me> <o2kujc1a2deaibdv40ilpc8seanjdn0pok@4ax.com> <ohntot$6ec$1@dont-email.me> <1a6033ff-f90a-4fd8-8f78-99b83fccab9a@googlegroups.com> |
Hi Ed,
On 6/13/2017 2:24 PM, Ed Prochak wrote:
>>>> But you can't examine algorithms and characterize their behaviors,
>>>> costs, etc. without being able to reify them.
>>>
>>> To a 1st approximation, you can. E.g., given just an equation, you
>>> can count the arithmetic operations and approximate the number of
>>> operand reads and result writes.
>>
>> Yes, but only for evaluating *relative* costs/merits of algorithms.
>> It assumes you can "value" the costs/performance of the different
>> operators in some "intuitive" manner.
>
> I'm jumping in late here so forgive me if you covered this.
>
> Algorithmic analysis is generally order of magnitude (the familiar
> Big O notation) and independent of hardware implementation.
Correct. But, it's only "order of" assessments. I.e., is this
a constant time algorithm? Linear time? Quadratic? Exponential?
etc.
There's a lot of handwaving in O() evaluations of algorithms.
What's the relative cost of multiplication vs. addition operators?
Division? etc.
With O() you're just trying to evaluate the relative merits of one
approach over another in gross terms.
>> This doesn't always hold. E.g., a more traditionally costly operation
>> might be "native" while the *expected* traditional operation has to be
>> approximated or emulated.
>
> I'm not quite sure what you are saying here, Don.
> What's the difference between "native" and *expected*?
>
> Is it that you *expected* the system to have a floating point
> multiply, but the "native" hardware does not so it is emulated?
Or, exactly the reverse: that it had the more complex operator
but not the "simpler" (expected) one.
We *expect* integer operations to be cheap. We expect logical
operators to be <= additive operators <= multiplication, etc.
But, that's not always the case.
E.g., having a "multiply-and-accumulate" instruction (common in DSP)
can eliminate the need for an "add" opcode (i.e., multiplication is as
"expensive" as addition).
I've designed (specialty) CPU's that had hardware to support direct
(native) implementation of DDA's. But, trying to perform a simple
"logical" operation would require a page of code (because there were no
logical operators so they'd have to be emulated).
Atari (?) made a processor that could only draw arcs -- never straight
lines (despite the fact that line segments SHOULD be easier).
Limbo initially took the approach of having five "base" data types:
- byte
- int ("long")
- big ("long long")
- real ("double")
- string
(These are supported directly by the underlying VM) No pointer types.
No shorts, short-reals (floats), etc. If you want something beyond
an integer, you go balls out and get a double!
The haughtiness of always relying on "gold" instead of "lead" proved
impractical, in he real world. So, there are now things like native
support for Q-format -- and beyond (i.e., you can effectively declare the
value of the rightmost bit AND a maximum value to representable by
that particular "fixed" type):
hourlyassessment: type fixed(0.1, 40.0);
timespentworking, timeinmeetings: hourlyassessment;
LETTER: con 11.0;
DPI: con 400;
inches: type fixed(1/DPI, LETTER);
topmargin: inches;
Likewise, the later inclusion of REFERENCES to functions as a compromise
in the "no pointers" mentality. (you don't *need* references as you
can map functions to integer identifiers and then use big "case"
statements (the equivalent of "switch") to invoke one of N functions
as indicated by that identifier; just far less efficiently (enough
so that you'd make a change to the LANGUAGE to support it?)
While not strictly on-topic, it's vindication that "rough" approximations
of the cost of operators can often be far enough astray that you need to
refine the costs "in practice". I.e., if "multiplication" could just
be considered to have *a* cost, then there's be no need for all those
numerical data types.
So... you can use O-notation to compare the relative costs of different
algorithms on SOME SET of preconceived available operators and data types.
You have some implicit preconceived notion of what the "real" machine is
like.
But, mapping this to a real implementation is fraught with opportunities
to come to the wrong conclusions (e.g., if you think arcs are expensive
as being built from multiple chords, you'll favor algorithms that minimize
the number of chords used)
> first:
>>>> You can't just magically invent an abstract language that supports:
>>>> solve_homework_problem(identifier)
>>>
> second:
>>> You can invent it ... you just [currently] can't implement it.
>>
> third:
>> Sure you can! You just have to find someone sufficiently motivated to
>> apply their meatware to the problem! There's nothing specifying the
>> *time* that the implementation needs to take to perform the operation!
>
> I'm confused here too, Don, unless the quotation levels are off.
> Is it you that said the first and third comments above?
Yes.
> They seem contradictory. (or else you are referencing
> different contexts?)
Read them again; the subject changes:
1. You can't invent that magical language that allows you to solve
homework assignments with a single operator <grin>
2. You can INVENT it, but can't IMPLEMENT it (i.e., its just a conceptual
language that doesn't run on any REAL machine)
3. You *can* IMPLEMENT it; find a flunky to do the work FOR you!
(tongue firmly in cheek)
Back to comp.arch.embedded | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Portable Assembly rickman <gnuarm@gmail.com> - 2017-05-27 15:39 -0400
Re: Portable Assembly Grant Edwards <invalid@invalid.invalid> - 2017-05-27 21:05 +0000
Re: Portable Assembly Mel Wilson <mwilson@the-wire.com> - 2017-05-27 21:29 +0000
Re: Portable Assembly upsidedown@downunder.com - 2017-05-28 00:36 +0300
Re: Portable Assembly Grant Edwards <invalid@invalid.invalid> - 2017-05-27 21:56 +0000
Re: Portable Assembly Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2017-05-28 14:36 +0200
Re: Portable Assembly David Brown <david.brown@hesbynett.no> - 2017-05-29 09:53 +0200
Re: Portable Assembly Les Cargill <lcargill99@comcast.com> - 2017-05-27 16:17 -0500
Re: Portable Assembly Dimiter_Popoff <dp@tgi-sci.com> - 2017-05-28 00:31 +0300
Re: Portable Assembly Theo Markettos <theom+news@chiark.greenend.org.uk> - 2017-05-27 22:52 +0100
Re: Portable Assembly Grant Edwards <invalid@invalid.invalid> - 2017-05-27 21:58 +0000
Re: Portable Assembly upsidedown@downunder.com - 2017-05-28 07:37 +0300
Re: Portable Assembly rickman <gnuarm@gmail.com> - 2017-05-28 01:28 -0400
Re: Portable Assembly Tom Gardner <spamjunk@blueyonder.co.uk> - 2017-05-28 07:33 +0100
Re: Portable Assembly rickman <gnuarm@gmail.com> - 2017-05-28 03:22 -0400
Re: Portable Assembly Tom Gardner <spamjunk@blueyonder.co.uk> - 2017-05-28 08:49 +0100
Re: Portable Assembly upsidedown@downunder.com - 2017-05-28 15:03 +0300
Re: Portable Assembly Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2017-05-28 12:26 +0300
Re: Portable Assembly Dimiter_Popoff <dp@tgi-sci.com> - 2017-05-28 01:04 +0300
Re: Portable Assembly David Brown <david.brown@hesbynett.no> - 2017-05-29 10:43 +0200
Re: Portable Assembly Anssi Saari <as@sci.fi> - 2017-05-31 10:19 +0300
Re: Portable Assembly Don Y <blockedofcourse@foo.invalid> - 2017-05-31 01:49 -0700
Re: Portable Assembly Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2017-05-31 15:56 +0300
Re: Portable Assembly Don Y <blockedofcourse@foo.invalid> - 2017-05-29 02:33 -0700
Re: Portable Assembly upsidedown@downunder.com - 2017-05-29 23:46 +0300
Re: Portable Assembly Don Y <blockedofcourse@foo.invalid> - 2017-05-29 13:54 -0700
Re: Portable Assembly Don Y <blockedofcourse@foo.invalid> - 2017-05-27 15:52 -0700
Re: Portable Assembly Dimiter_Popoff <dp@tgi-sci.com> - 2017-05-28 02:14 +0300
Re: Portable Assembly Don Y <blockedofcourse@foo.invalid> - 2017-05-27 17:14 -0700
Re: Portable Assembly Dimiter_Popoff <dp@tgi-sci.com> - 2017-05-28 03:38 +0300
Re: Portable Assembly Don Y <blockedofcourse@foo.invalid> - 2017-05-27 18:42 -0700
Re: Portable Assembly Stefan Reuther <stefan.news@arcor.de> - 2017-05-28 18:45 +0200
Re: Portable Assembly Dimiter_Popoff <dp@tgi-sci.com> - 2017-05-28 20:47 +0300
Re: Portable Assembly Stefan Reuther <stefan.news@arcor.de> - 2017-05-29 18:43 +0200
Re: Portable Assembly Don Y <blockedofcourse@foo.invalid> - 2017-05-29 10:23 -0700
Re: Portable Assembly "Boudewijn Dijkstra" <sp4mtr4p.boudewijn@indes.com> - 2017-05-30 16:31 +0200
Re: Portable Assembly Grant Edwards <invalid@invalid.invalid> - 2017-05-29 01:59 +0000
Re: Portable Assembly Dimiter_Popoff <dp@tgi-sci.com> - 2017-05-29 05:21 +0300
Re: Portable Assembly Les Cargill <lcargill99@comcast.com> - 2017-05-28 22:04 -0500
Re: Portable Assembly Don Y <blockedofcourse@foo.invalid> - 2017-05-29 02:57 -0700
Re: Portable Assembly David Brown <david.brown@hesbynett.no> - 2017-05-29 11:00 +0200
Re: Portable Assembly Dimiter_Popoff <dp@tgi-sci.com> - 2017-05-29 15:08 +0300
Re: Portable Assembly David Brown <david.brown@hesbynett.no> - 2017-05-29 15:06 +0200
Re: Portable Assembly Dimiter_Popoff <dp@tgi-sci.com> - 2017-05-29 20:02 +0300
Re: Portable Assembly David Brown <david.brown@hesbynett.no> - 2017-05-29 23:13 +0200
Re: Portable Assembly Dimiter_Popoff <dp@tgi-sci.com> - 2017-05-30 16:53 +0300
Re: Portable Assembly David Brown <david.brown@hesbynett.no> - 2017-05-31 11:36 +0200
Re: Portable Assembly Dimiter_Popoff <dp@tgi-sci.com> - 2017-06-01 22:43 +0300
Re: Portable Assembly David Brown <david.brown@hesbynett.no> - 2017-06-02 13:27 +0200
Re: Portable Assembly Grant Edwards <invalid@invalid.invalid> - 2017-05-29 13:48 +0000
Re: Portable Assembly Don Y <blockedofcourse@foo.invalid> - 2017-05-27 15:46 -0700
Re: Portable Assembly Tim Wescott <tim@seemywebsite.really> - 2017-05-28 23:59 -0500
Re: Portable Assembly Dimiter_Popoff <dp@tgi-sci.com> - 2017-05-28 00:23 +0300
Re: Portable Assembly jim.brakefield@ieee.org - 2017-05-27 16:54 -0700
Re: Portable Assembly Walter Banks <walter@bytecraft.com> - 2017-05-29 17:23 -0400
Re: Portable Assembly "Boudewijn Dijkstra" <sp4mtr4p.boudewijn@indes.com> - 2017-06-02 17:03 +0200
Re: Portable Assembly Mike Perkins <spam@spam.com> - 2017-06-05 15:39 +0100
Re: Portable Assembly David Brown <david.brown@hesbynett.no> - 2017-06-05 18:10 +0200
Re: Portable Assembly Don Y <blockedofcourse@foo.invalid> - 2017-06-05 09:10 -0700
Re: Portable Assembly George Neuner <gneuner2@comcast.net> - 2017-06-06 00:24 -0400
Re: Portable Assembly David Brown <david.brown@hesbynett.no> - 2017-06-06 11:05 +0200
Re: Portable Assembly Don Y <blockedofcourse@foo.invalid> - 2017-06-06 07:03 -0700
Re: Portable Assembly David Brown <david.brown@hesbynett.no> - 2017-06-06 16:58 +0200
Re: Portable Assembly Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2017-06-06 21:26 +0300
Re: Portable Assembly George Neuner <gneuner2@comcast.net> - 2017-06-06 16:42 -0400
Re: Portable Assembly Don Y <blockedofcourse@foo.invalid> - 2017-06-06 23:16 -0700
Re: Portable Assembly George Neuner <gneuner2@comcast.net> - 2017-06-08 06:38 -0400
Re: Portable Assembly Dimiter_Popoff <dp@tgi-sci.com> - 2017-06-08 15:58 +0300
Re: Portable Assembly upsidedown@downunder.com - 2017-06-08 21:34 +0300
Re: Portable Assembly Les Cargill <lcargill99@comcast.com> - 2017-06-10 15:27 -0500
Re: Portable Assembly Les Cargill <lcargill99@comcast.com> - 2017-06-10 15:23 -0500
Re: Portable Assembly Tom Gardner <spamjunk@blueyonder.co.uk> - 2017-06-08 14:50 +0100
Re: Portable Assembly Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2017-06-08 17:38 +0300
Re: Portable Assembly Tom Gardner <spamjunk@blueyonder.co.uk> - 2017-06-08 16:37 +0100
Re: Portable Assembly George Neuner <gneuner2@comcast.net> - 2017-06-09 14:14 -0400
Re: Portable Assembly Tom Gardner <spamjunk@blueyonder.co.uk> - 2017-06-09 22:25 +0100
Re: Portable Assembly Clifford Heath <no.spam@please.net> - 2017-06-10 09:54 +1000
Re: Portable Assembly Don Y <blockedofcourse@foo.invalid> - 2017-06-09 00:06 -0700
Re: Portable Assembly George Neuner <gneuner2@comcast.net> - 2017-06-09 22:14 -0400
Re: Portable Assembly Don Y <blockedofcourse@foo.invalid> - 2017-06-09 22:50 -0700
Re: Portable Assembly George Neuner <gneuner2@comcast.net> - 2017-06-10 21:01 -0400
Re: Portable Assembly Don Y <blockedofcourse@foo.invalid> - 2017-06-11 00:39 -0700
Re: Portable Assembly George Neuner <gneuner2@comcast.net> - 2017-06-12 23:27 -0400
Re: Portable Assembly Don Y <blockedofcourse@foo.invalid> - 2017-06-12 22:42 -0700
Re: Portable Assembly Ed Prochak <edprochak@gmail.com> - 2017-06-13 14:24 -0700
Re: Portable Assembly Don Y <blockedofcourse@foo.invalid> - 2017-06-13 21:57 -0700
Re: Portable Assembly Reinhardt Behm <rbehm@hushmail.com> - 2017-06-14 13:26 +0800
Re: Portable Assembly Don Y <blockedofcourse@foo.invalid> - 2017-06-13 23:58 -0700
Re: Portable Assembly Ed Prochak <edprochak@gmail.com> - 2017-06-19 06:48 -0700
Re: Portable Assembly Don Y <blockedofcourse@foo.invalid> - 2017-06-19 16:45 -0700
Re: Portable Assembly Ed Prochak <edprochak@gmail.com> - 2017-06-20 15:07 -0700
Re: Portable Assembly Don Y <blockedofcourse@foo.invalid> - 2017-06-21 07:37 -0700
Re: Portable Assembly David Brown <david.brown@hesbynett.no> - 2017-06-07 09:20 +0200
Re: Portable Assembly Niklas Holsti <niklas.holsti@tidorum.invalid> - 2017-06-07 00:30 +0300
Re: Portable Assembly George Neuner <gneuner2@comcast.net> - 2017-06-07 02:02 -0400
csiph-web