[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*To*: jaffer@martigny.ai.mit.edu*Subject*: Re: Bitwise logical operators*From*: tmb@idiap.ch (Thomas M. Breuel)*Date*: Thu, 18 Jun 92 23:44:45 +0200*Cc*: rrrs-authors@ai.mit.edu

| What would distinguish the "library" | section from the "language" section is that everything in the "library" | section could be expressed reasonably efficiently (O(1), though, | possibly, with somewhat large constants) in terms of language | primitives (except macros). | |The O(1) constraint is rather stringent. SORT, a prototypical library |function, would not conform, would it? FFT's and databases come to |mind as well. I suppose one could hide linear factors by the use of |MAP and FOR-EACH, but this would encourage convoluted algorithms for |the sake of inclusion. By "O(1)" I mean the relative performance of a hypothetical built-in and its simulation in a library. SORT is Theta(N log N) regardless of whether you put it in the standard library or the language. Vectors, on the other hand, could not be simulated in time "O(1)" if they weren't provided as primitives, so they should stay in the "language" section. Again, the purpose of having a separate library section would be that implementors could choose to go with acceptable standard versions of functions, or that they could choose to special-case commonly used functions in the compiler. For example, I would think that SIN should be part of the library (with a reasonably portable implementation), but that high-performance implementations would generate in-line code for it. Other candidates for the library are multidimensional arrays, hash tables, and non-generic arithmetic functions. I'm no proposing this as a hard rule, but simply as what I consider a "reasonable guideline". Thomas.

**Follow-Ups**:**Re: Bitwise logical operators***From:*david carlton <carlton@husc.harvard.edu>

- Prev by Date:
**Bitwise logical operators** - Next by Date:
**another macro system** - Prev by thread:
**Bitwise logical operators** - Next by thread:
**Re: Bitwise logical operators** - Index(es):