Results 1 - 10
of
38
A Critique of Standard ML
, 1992
"... Standard ML is an excellent language for many kinds of programming. It is safe, efficient, suitably abstract, and concise. There are many aspects of the language that work well. However, nothing is perfect: Standard ML has a few shortcomings. In some cases there are obvious solutions, and in other c ..."
Abstract
-
Cited by 89 (4 self)
- Add to MetaCart
Standard ML is an excellent language for many kinds of programming. It is safe, efficient, suitably abstract, and concise. There are many aspects of the language that work well. However, nothing is perfect: Standard ML has a few shortcomings. In some cases there are obvious solutions, and in other cases further research is required.
Time and Space Profiling for Non-Strict, Higher-Order Functional Languages
- In 22'nd ACM Symposium on Principles of Programming Languages
, 1995
"... We present the first profiler for a compiled, non-strict, higher-order, purely functional language capable of measuring time as well as space usage. Our profiler is implemented in a production-quality optimising compiler for Haskell, has low overheads, and can successfully profile large application ..."
Abstract
-
Cited by 39 (7 self)
- Add to MetaCart
We present the first profiler for a compiled, non-strict, higher-order, purely functional language capable of measuring time as well as space usage. Our profiler is implemented in a production-quality optimising compiler for Haskell, has low overheads, and can successfully profile large applications. A unique feature of our approach is that we give a formal specification of the attribution of execution costs to cost centres. This specification enables us to discuss our design decisions in a precise framework. Since it is not obvious how to map this specification onto a particular implementation, we also present an implementation-oriented operational semantics, and prove it equivalent to the specification. 1 Motivation and overview Everyone knows the importance of profiling tools: the best way to improve a program's performance is to concentrate on the parts of the program which are eating the lion's share of the total space and time resources. One would expect profiling tools to be ...
An Empirical and Analytic Study of Stack vs. Heap Cost for Languages with Closures
, 1993
"... We present a comprehensive analysis of all the components of creation, access, and disposal of heap-allocated and stack-allocated activation records. Among our results are: . Although stack frames are known to have a better cache read-miss rate than heap frames, our simple analytical model (backed ..."
Abstract
-
Cited by 29 (2 self)
- Add to MetaCart
We present a comprehensive analysis of all the components of creation, access, and disposal of heap-allocated and stack-allocated activation records. Among our results are: . Although stack frames are known to have a better cache read-miss rate than heap frames, our simple analytical model (backed up by simulation results) shows that the di#erence is too trivial to matter. . The cache write-miss rate of heap frames is very high; we show that a variety of miss-handling strategies (exemplified by specific modern machines) can give good performance, but not all can. . Stacks restrict the flexibility of closure representations (for higher-order functions) in important (and costly) ways. . The extra load placed on the garbage collector by heap-allocated frames is small. . The demands of modern programming languages make stacks complicated to implement e#ciently and correctly. Overall, the execution cost of stack-allocated and heap-allocated frames is similar; but heap frames are s...
Compiling Standard ML For Efficient Execution On Modern Machines
, 1994
"... Many language theoreticians have taken great efforts in designing higher-level programming languages that are more elegant and more expressive than conventional languages. However, few of these new languages have been implemented very efficiently. The result is that most software engineers still pre ..."
Abstract
-
Cited by 18 (3 self)
- Add to MetaCart
Many language theoreticians have taken great efforts in designing higher-level programming languages that are more elegant and more expressive than conventional languages. However, few of these new languages have been implemented very efficiently. The result is that most software engineers still prefer to use conventional languages, even though the new higherlevel languages offer a better and simpler programming model. This dissertation concentrates on improving the performance of programs written in Standard ML (SML)---a statically typed functional language---on today's RISC machines. SML poses tough challenges to efficient implementations: very frequent function calls, polymorphic types, recursive data structures, higher-order functions, and first-class continuations. This dissertation presents the design and evaluation of several new compilation techniques that meet these challenges by taking advantage of some of the higher-level language features in SML. Type-directed compilation ...
Fixing Some Space Leaks without a Garbage Collector
, 1993
"... This paper describes a method for eliminating a certain class of space leaks in lazy functional languages. A program that space leaks consumes more memory than would be expected. This may lead to longer execution time, or that the program unnecessarily runs out of memory. It has been known for a lon ..."
Abstract
-
Cited by 18 (2 self)
- Add to MetaCart
This paper describes a method for eliminating a certain class of space leaks in lazy functional languages. A program that space leaks consumes more memory than would be expected. This may lead to longer execution time, or that the program unnecessarily runs out of memory. It has been known for a long time that functions returning tuples may give rise to space leaks. Hughes [Hug83] has shown that some programs must leak memory, if a sequential 1 evaluator is used. Several researchers have tried to solve this problem, with varying approaches, by introducing the necessary parallelism. Some of them modify the garbage collector, or use special operators to parallelize the programs explicitly. The approach used here is to use pattern bindings in definitions, which are available in most functional languages, to control the parallelism. No modification of the garbage collector or special operators are needed. The method has been implemented in the Chalmers LML/HBC compiler [AJ93, AJ89]. 1 I...
Lag, Drag, Void and Use - Heap Profiling and Space-Efficient Compilation Revisited
- In Proc. Intl. Conf. on Functional Programming
, 1996
"... The context for this paper is functional computation by graph reduction. Our overall aim is more efficient use of memory. The specific topic is the detection of dormant cells in the live graph --- those retained in heap memory though not actually playing a useful role in computation. We describe a p ..."
Abstract
-
Cited by 16 (3 self)
- Add to MetaCart
The context for this paper is functional computation by graph reduction. Our overall aim is more efficient use of memory. The specific topic is the detection of dormant cells in the live graph --- those retained in heap memory though not actually playing a useful role in computation. We describe a profiler that can identify heap consumption by such `useless' cells. Unlike heap profilers based on traversals of the live heap, this profiler works by examining cells postmortem. The new profiler has revealed a surprisingly large proportion of `useless' cells, even in some programs that previously seemed space-efficient such as the boot-strapping Haskell compiler nhc. 1 Introduction A typical computation by graph reduction involves a large and changing population of heap-memory cells. Taking a census of this population at regular intervals can be very instructive, both for functional programmers and for functional-language implementors. A heap profiler [RW93] records population counts for ...
Profiling Large-Scale Lazy Functional Programs
- JOURNAL OF FUNCTIONAL PROGRAMMING
, 1998
"... The LOLITA natural language processor is an example of one of the ever-increasing number of large-scale systems written entirely in a functional programming language. The system consists of over 47,000 lines of Haskell code (excluding comments) and is able to perform a wide range of tasks such as se ..."
Abstract
-
Cited by 14 (3 self)
- Add to MetaCart
The LOLITA natural language processor is an example of one of the ever-increasing number of large-scale systems written entirely in a functional programming language. The system consists of over 47,000 lines of Haskell code (excluding comments) and is able to perform a wide range of tasks such as semantic and pragmatic analysis of text, information extraction and query analysis. The efficiency of such a system is critical; interactive tasks (such as query analysis) must ensure that the user is not inconvenienced by long pauses, and batch mode tasks (such as information extraction) must ensure that an adequate throughput can be achieved. For the past three years the profiling tools supplied with GHC and HBC have been used to analyse and reason about the complexity of the LOLITA system. There have been good results, however experience has shown that in a large system the profiling life-cycle is often too long to make detailed analysis possible, and the results are often misleading. In response to these problems a profiler has been developed which allows the complete set of program costs to be recorded in so-called cost-centre stacks. These program costs are then analysed using a post-processing tool to allow the developer to explore the costs of the program in ways that are either not possible with existing tools or would require repeated compilations and executions of the program. The modifications to the Glasgow Haskell compiler based on detailed cost semantics and an efficient implementation scheme are discussed. The results of using this new profiling tool in the analysis of a number of Haskell programs are also presented. The overheads of the scheme are discussed and the benefits of this new system are considered. An outline is also given of how this approach can be modified to assist with the tracing and debugging of programs.
Abstract Machines for Dynamic Computation
- UNIVERSITY OF EDINBURGH
, 2001
"... In this thesis we address the challenges associated with the provision of dynamic software architectures. These are systems in which programs are constructed from separately compiled units with a facility for the replacement of these units at runtime. Typical examples of applications which will bene ..."
Abstract
-
Cited by 9 (0 self)
- Add to MetaCart
In this thesis we address the challenges associated with the provision of dynamic software architectures. These are systems in which programs are constructed from separately compiled units with a facility for the replacement of these units at runtime. Typical examples of applications which will benefit from this dynamic approach are long-lived systems in which downtime is highly undesirable, for example, web-servers, database engines, and equipment controllers. In addition, dynamic software architectures are also gaining popularity with the recent advent of wide-area Internet applications, where it is often impractical to compile a program in its entirety or begin execution in a single step. Our approach to dynamic software architectures differs from earlier attempts in that we guarantee the safety of the replacement operation. This is done by founding our techniques on the rigour of strong typing. In the first half of the thesis we take an existing static software architecture with strong typing facilities and modular program construction, namely the Standard ML platform, and equip

