Leonardo de Moura
970941db2c
feat(library/init/data/array/basic): add Array.filter
2019-05-02 09:51:08 -07:00
Leonardo de Moura
1707628b6b
feat(library/init/data/array/basic): Array.reverse
2019-05-01 17:38:44 -07:00
Leonardo de Moura
45d09d3044
fix(library/compiler/ir): bug at LLNF -> IR
2019-05-01 17:38:44 -07:00
Leonardo de Moura
ed5e461130
feat(library/init/lean/compiler/ir): add maxVar
2019-05-01 17:38:44 -07:00
Leonardo de Moura
fa0b4bff40
chore(tests/playground/parser/syntax): fix experiment
2019-04-30 18:06:03 -07:00
Leonardo de Moura
d433811c64
test(tests/playground): add "checkpoint" variant for rbmap benchmark
...
@kha I created a variant of the `rbmap` example where we create a tree
but also save "checkpoints". The idea is to simulate the idiom frequently
used in a backtracking search where we "save" the "context" before each
case split in a "trail stack".
The benchmark has two parameters: the number of nodes to be inserted, and a "frequency" (how often we create a "checkpoint").
The command `rbmap_checkpoint.lean.out n n` behaves like the original
`rbmap` benchmark, and `rbmap_checkpoint.lean.out n 1` creates a
checkpoint after each insertion. The frequency provides a simple way to
control the amount of sharing. We can provide performance numbers for
different frequencies, and show the impact on the `reset/reuse` optimization.
BTW, the performance numbers are much better than I expected. For
example,
`./rbmap_checkpoint.lean.out 1000000 10` is only 30% slower than
`./rbmap_checkpoint.lean.out 1000000 1000000`
although 100k checkpoints were created.
Another good news is that we are faster than Haskell even for
`./rbmap_checkpoint.lean.out 1000000 1`
2019-04-30 10:41:23 -07:00
Leonardo de Moura
e0821be132
chore(tests/playground/ir): fix test
2019-04-29 10:50:10 -07:00
Leonardo de Moura
5298841def
test(tests/playground/ir): small test
2019-04-29 10:47:51 -07:00
Leonardo de Moura
df84868ab4
feat(library/init/data/array/basic): array helper functions
2019-04-28 10:10:24 -07:00
Leonardo de Moura
aefe49d575
test(tests/playground): add new rbmap experiment
2019-04-27 08:02:32 -07:00
Leonardo de Moura
e1a84d2f2c
fix(library/compiler/struct_cases_on): performance problem exposed by badupdate1.lean
2019-04-26 16:30:19 -07:00
Leonardo de Moura
240ca3fc68
test(tests/playground/badupdate1): add test for exposing performance bug at struct_cases_on_fn
...
```
./run.sh badupdate1.lean 4000
8000
test1 2.12s
8000
test2 1.11ms
```
2019-04-26 15:04:39 -07:00
Leonardo de Moura
1a1105b533
test(tests/playground/lazylist): perf tests
2019-04-26 13:12:39 -07:00
Leonardo de Moura
a5128484a1
test(tests/playground/lazylist): perf tests
2019-04-26 12:05:16 -07:00
Leonardo de Moura
9a39eb254a
chore(tests/playground): fix tests
2019-04-25 16:48:06 -07:00
Leonardo de Moura
9fb404353e
test(tests/playground/lazylist): add cycle
2019-04-25 11:04:04 -07:00
Leonardo de Moura
c8a045d69f
test(tests/playground/parser/parser): add HasAndthen and HasOrelse instances
2019-04-24 14:05:45 -07:00
Leonardo de Moura
014c7e3374
test(tests/playground/parser/parser): "liftable" longestMatch
...
For lists of size 0, 1 and 2, it avoids the overhead of creating
temporary lists of closures. I measure the overhead with `test1.lean`
and there is no overhead in this case.
`test1.lean` has a test for length = 4, and the overhead is 7%.
We only use longestMatch to implement the Pratt Parser.
The lists should be small. So, the overhead is acceptable.
If it is not. We can add back the `longestMatch` specific for `TermParser`.
cc @kha
2019-04-24 11:23:06 -07:00
Leonardo de Moura
5991337279
test(tests/playground/parser/test1): add test and timeit
2019-04-24 11:20:44 -07:00
Leonardo de Moura
5188adc685
test(tests/playground/parser): add longestMatch and other helper functions
2019-04-23 17:29:38 -07:00
Leonardo de Moura
3d8c3d5789
test(tests/playground/parser/parser): add unicodeSymbol parser
2019-04-23 09:34:41 -07:00
Leonardo de Moura
cac080f504
test(tests/playground/mapVShmap): use {x with ...} notation in the test
2019-04-22 13:42:53 -07:00
Leonardo de Moura
32f41f60d3
feat(runtime/object): add dbgTraceIfShared primitive for debugging RC reuse issues
2019-04-19 16:26:45 -07:00
Leonardo de Moura
363f7dc6f4
test(tests/playground/mapVShmap): add example where hmap is almost 3x faster than map
2019-04-19 14:52:52 -07:00
Leonardo de Moura
e844afb64a
test(tests/playground/parser/syntax): propagate lazy macro scopes
2019-04-19 14:52:52 -07:00
Leonardo de Moura
6659836734
chore(tests/playground): fix tests
2019-04-18 17:29:49 -07:00
Leonardo de Moura
2eed00039a
chore(tests/playground/parser/parser): remove Thunk hack
...
The artificial `Thunk` was being used just to make sure a `Parser`
object was small enough to be inlined. We don't need this hack anymore.
Commit 0ea944a adds a new transformation that makes sure the size of
field `info` does not impact the decision on whether field `fn` will be
inlined or not.
2019-04-18 13:18:31 -07:00
Leonardo de Moura
0ea944ad9f
feat(library/compiler/csimp): add transformation to complement eager lambda lifting
2019-04-18 13:12:11 -07:00
Leonardo de Moura
e3dfc73b3a
chore(tests/playground/deriv): fix test
2019-04-17 18:12:08 -07:00
Leonardo de Moura
6b53700d60
test(tests/playground/parser/test1): improve
2019-04-13 08:15:56 -07:00
Leonardo de Moura
a716528067
fix(tests/playground/parser/parser): reset position
2019-04-13 08:07:29 -07:00
Leonardo de Moura
68e8faeef1
test(tests/playground/parser/parser): add sepBy and sepBy1
2019-04-13 07:56:35 -07:00
Leonardo de Moura
52fa06ad38
fix(tests/playground/parser/parser): fix tryFn
2019-04-13 07:36:48 -07:00
Leonardo de Moura
2377b10c2c
test(tests/playground/parser): minor
2019-04-12 09:05:22 -07:00
Leonardo de Moura
d7de85e1e7
fix(tests/playground/parser/parser): small bugs
2019-04-12 08:58:02 -07:00
Leonardo de Moura
48ba69775a
fix(tests/playground/parser/syntax): initialization
2019-04-12 08:25:47 -07:00
Leonardo de Moura
e53cb81255
test(tests/playground/parser): replace parser.lean with parser2.lean
2019-04-12 07:50:50 -07:00
Leonardo de Moura
87690217c6
test(tests/playground/parser/parser2): add missing definitions
2019-04-12 07:30:43 -07:00
Leonardo de Moura
376830bd0d
chore(tests/playground/parser): missing files and small issues
2019-04-12 07:29:46 -07:00
Leonardo de Moura
be328bd8e9
test(tests/playground/parser/parser2): add symbol BasicParser
2019-04-10 08:58:41 -07:00
Leonardo de Moura
1c73a4d089
test(tests/playground/parser): add identFn
2019-04-09 09:16:12 -07:00
Leonardo de Moura
67ba4d25b1
test(tests/playground/parser/parser2): add number parser
2019-04-09 07:20:35 -07:00
Leonardo de Moura
ab5519c7fe
test(tests/playground/parser/parser2): add recurse
2019-04-08 07:57:45 -07:00
Leonardo de Moura
b633b32f2c
test(tests/playground/parser/parser2): add whitespace and strLit
2019-04-08 07:39:55 -07:00
Leonardo de Moura
363f4449e4
test(tests/playground/parser/parser2): add optional combinator
2019-04-08 06:37:41 -07:00
Leonardo de Moura
deba610203
test(tests/playground/parser/parser2): add many and many1 combinators
2019-04-07 13:41:22 -07:00
Leonardo de Moura
16f9d1a5b6
test(tests/playground/parser/parser2): add node combinator
2019-04-07 13:26:25 -07:00
Leonardo de Moura
9c81cd7f1d
feat(library/init/data/array/basic): add Array.extract
2019-04-07 13:08:23 -07:00
Leonardo de Moura
d7035497f3
test(tests/playground/parser): continue experiment
2019-04-07 12:45:11 -07:00
Leonardo de Moura
97ebe4603b
test(tests/playground/parser): add syntax.lean with flat nodes and arrays
2019-04-06 19:36:04 -07:00