Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How does Q perform in comparison with other (functional) programming languages?

0
10 Posted

How does Q perform in comparison with other (functional) programming languages?

0

This is a mixed bag, but all in all I consider Q as efficient enough for practical purposes. Right now, only a bytecode interpreter implementation is available, so you cannot expect Q programs to run as fast as native machine code compiled from languages like C. Nevertheless, pattern matching is done reasonably fast, as it uses some kind of generalized DFA device which only performs a single, non-backtracking left-to-right scan of the target expression in each reduction. Moreover, the basic eager evaluation strategy admits an efficient stack-based implementation. To give you a concrete figure, I found that with simple kinds of definitions on an Athlon 1400 typically some 400-600K reductions are performed per second. In the benchmarks I did I found that Q scripts implementing simple list processing functions execute about as fast as their equivalents in CLISP, the Common Lisp interpreter by Haible et al, which appears to be a fairly efficient implementation. Heavily recursive functions

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123