Even Wiik Thomassen committed 8e249f3


  • Participants
  • Parent commits 5b9d8c1

Comments (0)

Files changed (2)

File benchmarks.tex

-\subsection{Built-in functionally or Prelude}
+\section{Built-in functionality or Prelude}
 The \textit{Length} benchmark, as seen in \mylst{length} implement the length
 function in Haskell, instead of using the Haskell Prelude. Since external Core
 issues (as mentioned in \autoref{cha:extcore}) prevents us from reusing
 We can compare the performance of Prelude functions implemented in RPython
 against Prelude functions implemented in Haskell with the help of the
-\textit{Length} and \textit{RPy-Length} benchmarks.
+\textit{Length}, \textit{Replicate} (\mylst{replicate}), and
+\textit{RPy-Length} (\mylst{rpylength}) benchmarks. Replicate is same as
+length, but the function that creates the list is written in RPython, while
+RPy-Length uses the RPython length implementation. We have included the result
+of using both length and replicate written in RPython (with the name
+\mint{haskell}|main = putStrLn (show (length (replicate 500000 9)))|
-Prelude-implementation should perform similarly in \gls{ghc}, but ..
-TODO: Something about whether its better to do things, such as take, in
-RPython or in Haskell. What is faster?
+\begin{table}[htbp] \footnotesize \center
+\caption{PyHaskell Prelude benchmark results\label{tab:prelude}}
+\begin{tabular}{l r r r}
+    \toprule
+    Benchmark & Runtime & Operations & Guards  \\
+    \midrule
+    Length & \pmm{2.076}{0.250} & 124 & 23 \\
+    Replicate & \pmm{1.035}{0.157} & 45 & 9 \\
+    RPy-Length & \pmm{1.225}{0.196} & 79 & 14 \\
+    RPython & \pmm{0.126}{0.022} & 0 & 0 \\
+	\bottomrule
 %\subsection{Evaluate PyHaskell versus the module}

File frontmatter.tex

 %2. Say why it's an interesting problem.
 RPython has been used to implement VMs for many different programming
 languages, but not for any purely functional or lazy languages.
-Haskell has achieved impressive speed with ahead-of-time optimizations,
-while attempts at trace-based JIT optimizations have so far been unsuccessful.
+Haskell has achieved impressive speed with ahead-of-time optimizations.
+Attempts at trace-based JIT optimizations of Haskell have so far not achieved
+greater speed than static compilation.
 %3. Say what your solution achieves.
 PyHaskell, a prototype Haskell VM with a meta-tracing JIT compiler written in
 RPython, shows that the RPython toolchain is suitable for Haskell. While the