This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When dealing large data sets that do not fit in memory, it is crucial to limit the number | |
of accesses and iterations over the data set. | |
However, in a high level language it may not be immediately obvious how many iterations a | |
particular program will require. | |
The number of iterations becomes even less obvious in the presence of heuristic and | |
statistics-based optimisations, as used by traditional databases: a small tweak to the query | |
or even modifying the number of rows in a table can cause drastic changes to the query plan. | |
With the advent of "big data", and as data sets continue to grow, a high level language with | |
predictable runtime characteristics becomes more necessary. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module List | |
-- (actually List.ds but changed extension for syntax highlighting) | |
import foreign c value | |
q_string_concat : String -> String -> String | |
where | |
-- | A `Maybe` may contain a value, or not. | |
data Maybe (a : Data) where | |
Nothing : Maybe a | |
Just : a -> Maybe a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation; | |
protocol Num { | |
typealias T; | |
class func plus(T, T) -> T; | |
class func mul(T, T) -> T; | |
class func negate(T) -> T; | |
class func sub(T, T) -> T; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import qualified Data.Vector.Unboxed as U | |
import Data.List | |
import System.Random | |
import System.CPUTime | |
import Text.Printf | |
import Control.Exception | |
main :: IO () |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// from linpack benchmark. source: http://www.netlib.org/benchmark/linpackc | |
/*----------------------*/ | |
REAL second() | |
{ | |
#include <sys/time.h> | |
#include <sys/resource.h> | |
struct rusage ru; |
NewerOlder