skip to main content
10.1145/570407.570410acmconferencesArticle/Chapter ViewAbstractPublication PagesaplConference Proceedingsconference-collections
Article

Replacing an explicit loop by the "each" operator

Published:01 December 2000Publication History

ABSTRACT

A method of replacing an explicit loop by the "each" operator was studied. The repetitive, computational part of the loop was extracted into a function FOO. Then, the function was applied to each value of the loop counter vector C (FOO "each" C). Since array operations are optimized on most APL systems, this replacement should produce a most reasonable loop, assuming that in the function FOO array operations were used as much as possible. Two examples of performance measurements showed that this, generally, did not lead to smaller execution time. In one example the "each" operator was faster than an explicit loop while in another the opposite was true.

References

  1. Brown, James A., Pakin, Sandra, and Polivka, Raymond P. APL2 at Glance. Prentice Hall, Englewood Cliffs, NJ, 1988. 282. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Otto, Tilman P. "An APL compiler" APL Berlin 2000 Conference Proceedings APL Quote Quad Vol 30 No 4 Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Polivka, Raymond P. and Pakin, Sandra. APL: The Language and Its Usage. Prentice Hall, Englewood Cliffs, NJ, 1975. 397. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Replacing an explicit loop by the "each" operator

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in
          • Published in

            cover image ACM Conferences
            APL '01: Proceedings of the 2001 conference on APL: an arrays odyssey
            July 2001
            127 pages
            ISBN:1581134193
            DOI:10.1145/570407

            Copyright © 2000 Authors

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 1 December 2000

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • Article
          • Article Metrics

            • Downloads (Last 12 months)16
            • Downloads (Last 6 weeks)3

            Other Metrics

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader