<commit_before># Linear Algebra Performance Benchmarks

## List of benchmarks

1. Create a random 1000x1000 matrix.

2. Invert a 1000x1000 random matrix.

3. Compute the Cholesky decomposition of a random 1000x1000 matrix.

4. Vector (1 000 000) dot product.

5. Matrix (1000x1000) transpose.

6. Matrix (1000x1000 <> 1000x1000) multiply.

7. Sigmoid

8. ReLU

9. Sum by rows

10. sum by columns

11. indices of max elements in rows

12. indices of max elements in columns

## Results

* hmatrix: 0.18.0.0 (ghc: 8.0.2)
* numpy: 1.11.1 (python: 3.5.2)
* octave: 4.0.3
* gonum matrix: master (go: 1.8)

| Benchmark | hmatrix | numpy | octave | gonum matrix | LASwift |
|-----------------|----------------|-----------------|-------|-------|-------|
| 1. Random matrix | 16.10 ms  | 39.24 ms | 18.48 ms | 41.98 ms | 15 ms |
| 2. Invert matrix | 84.85 ms  | 84.74 ms | 57.00 ms | 364.49 ms | 47 ms |
| 3. Cholesky decomposition | 28.74 ms | 29.40 ms | 9.11 ms | 116.60 ms | 105 ms |<commit_msg>LASwift version<commit_after># Linear Algebra Performance Benchmarks

## List of benchmarks

1. Create a random 1000x1000 matrix.

2. Invert a 1000x1000 random matrix.

3. Compute the Cholesky decomposition of a random 1000x1000 matrix.

4. Vector (1 000 000) dot product.

5. Matrix (1000x1000) transpose.

6. Matrix (1000x1000 <> 1000x1000) multiply.

7. Sigmoid

8. ReLU

9. Sum by rows

10. sum by columns

11. indices of max elements in rows

12. indices of max elements in columns

## Results

* hmatrix: 0.18.0.0 (ghc: 8.0.2)
* numpy: 1.11.1 (python: 3.5.2)
* octave: 4.0.3
* gonum matrix: master (go: 1.8)
* LASwift: 0.1.1 (Apple Swift 3.0.2)

| Benchmark | hmatrix | numpy | octave | gonum matrix | LASwift |
|-----------------|----------------|-----------------|-------|-------|-------|
| 1. Random matrix | 16.10 ms  | 39.24 ms | 18.48 ms | 41.98 ms | 15 ms |
| 2. Invert matrix | 84.85 ms  | 84.74 ms | 57.00 ms | 364.49 ms | 47 ms |
| 3. Cholesky decomposition | 28.74 ms | 29.40 ms | 9.11 ms | 116.60 ms | 105 ms |
{'fraction_non_alphanumeric': 0.1864154685176004, 'fraction_numerical': 0.15071888943976203, 'mean_word_length': 2.26537216828479, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3120640', 'n_tokens_mistral': 966, 'n_tokens_neox': 724, 'n_words': 274}