ACM Home Page
Please provide us with feedback. Feedback
Hash table methods for case statements
Full text PdfPdf (315 KB)
Source ACM Southeast Regional Conference archive
Proceedings of the 20th annual Southeast regional conference table of contents
Knoxville, Tennessee
Pages: 211 - 216  
Year of Publication: 1982
ISBN:0-89791-071-0
Author
Jason Gait  University of Mississippi, University, Mississippi
Sponsor
ACM: Association for Computing Machinery
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 4,   Downloads (12 Months): 13,   Citation Count: 1
Additional Information:

abstract   references   cited by   index terms  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/503896.503932
What is a DOI?

ABSTRACT

The CASE statement evaluates an expression, selects an action according to the value of the expression and then executes the action. The most efficient runtime behavior is exhibited when the action can be selected via a jump table, which provides an entry for every possible value in the range of the expression but has execution time that is constant as the number of cases increases. If the range of the expression is too large then the jump table becomes impractical because of excessive space requirements. Implementations of the CASE statement that limit table size to increase linearly with the number of cases either require linear execution time or capitalize on the subrange structure of the expression to reduce the time requirement. Hash methods also limit space requirements, and in the case of hashing with chaining to resolve collisions can provide log n time performance. Open addressing methods provide constant time performance as the number of cases increases and, since the hash table is static and can be closely packed in an optimal fashion, the execution time can be limited to an average of less than two probes per selection even for closely packed tables. Open addressing in optimally packed tables leads to selection of the default case in fewer than eight probes. One can choose a hash function that facilitates extension of allowed data types from the usual byte and integer types to strings and double precision integers with minimal penalty in execution time.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
SALE 81. Sale, A., The Implementation of CASE Statements in PASCAL, Softw. Pract. and Exper., 11(1981)929-42.
2
3
 
4
BRENT75. Brent, R., Reducing the Retrieval Time in Scatter Storage Techniques, CACM, 18(1975)651-6.
5
6
 
7
 
8
MAUR7,5 Maurer, W. and T. Lewis, Methods, Comp. Surv., 7(1975)
9
10