Changes

Jump to navigation Jump to search

Performance

1,513 bytes added, 19 February
Created page with "As an interpreted language, some have lambasted APL as unreasonably slow compared to other languages. However, much work has been done to ensure that interpreted code from a t..."
As an interpreted language, some have lambasted APL as unreasonably slow compared to other languages. However, much work has been done to ensure that interpreted code from a typical user is reasonably performant. Since its first implementation, work has been done on compiling APL.

== Performant usage ==
For the user, there are a few strategies to consider for reasonable performance.
=== Mechanical sympathy ===
Internally, APL arrays are stored as two lists in memory. The first is a list of the shape (although some implementations also include the "stride"<ref>Nick Nickolov ''Compiling APL to JavaScript'' (Vector Volume 26)</ref>). The second is the ravel of elements in the array. Nested arrays consist of pointers to arrays which may be distributed across memory, their use can lead to very inefficient memory read patterns - in contrast to flat arrays which are stored as a contiguous block. This idea is also explored in the study of inverted tables<ref>Roger Hui ''Inverted Tables'' (Dyalog '18 User Meeting)</ref>.

== Performant implementation ==
For now enjoy a list of references.

=== Interpreters ===
==== Writing ====
[http://www.dyalog.com/blog/2015/06/in-praise-of-magic-functions-part-one/ Roger Hui; In Praise of Magic Functions; Dyalog Blog]
==== Video ====
[https://www.youtube.com/watch?v=84t87EO5ZEE Morten Kromberg, Roger Hui; Primitive Performance; Dyalog '13 User Meeting]

=== Compilers ===
- [https://http://snakeisland.com/ Snake Island Research]

== References ==
<references />

Navigation menu