Commit graph

15773 commits

Author SHA1 Message Date
Leonardo de Moura
a9458fdcb3 chore(runtime/alloc): remove incorrect assertion 2019-02-26 07:33:53 -08:00
Sebastian Ullrich
9724491dc2 test(tests/playground/binarytrees.lean): parallelize 2019-02-26 16:16:34 +01:00
Leonardo de Moura
f556423ae2 chore(library/compiler/llnf): add TODO 2019-02-25 17:43:21 -08:00
Leonardo de Moura
1f3de14f9c fix(runtime/object): embarrassing bug at del_core 2019-02-25 17:42:56 -08:00
Leonardo de Moura
3a252f5b55 chore(runtime/object): avoid overhead when SMALL_ALLOCATOR is disabled 2019-02-25 15:32:59 -08:00
Sebastian Ullrich
cf0bf911c8 test(tests/playground): binarytrees benchmarks game benchmark in Lean, OCaml & Haskell 2019-02-25 23:46:10 +01:00
Sebastian Ullrich
c4740b7295 test(tests/playground/rbmap.ml): take the same input as Lean version 2019-02-25 14:51:16 +01:00
Leonardo de Moura
0f9c52367d feat(library/equations_compiler/elim_match): prune equations occurring after equation that contains only pattern variables 2019-02-24 18:21:22 -08:00
Leonardo de Moura
e82632cbe4 chore(boot): update 2019-02-24 15:44:11 -08:00
Leonardo de Moura
2ff3899d62 fix(library/compiler/llnf): missing case at push_proj_fn
We were not pushing projections over scalar projections.
2019-02-24 15:39:53 -08:00
Leonardo de Moura
66b55d9d12 chore(CMakeLists.txt): add options for enabling/disabling LAZY_RC and SMALL_ALLOCATOR 2019-02-24 15:11:48 -08:00
Leonardo de Moura
67d197a2e0 fix(runtime/object): correct support for objects without RC
Lean was not crashing because we do not have region objects yet, and
the persistent objects still have a RC.
2019-02-24 09:29:20 -08:00
Leonardo de Moura
ccea4c2043 chore(tests/playground/rbmap): use +1 instead of +k to avoid big number arithmetic when we increase number of elements inserted 2019-02-24 08:49:38 -08:00
Leonardo de Moura
935d90e77c chore(runtime/object): disable lazy RC to collect data at speedcenter 2019-02-23 17:37:11 -08:00
Leonardo de Moura
abd0f89820 feat(runtime): avoid extra switch 2019-02-23 17:35:21 -08:00
Leonardo de Moura
4b44c5ce36 feat(runtime/object): small object allocator 2019-02-23 17:17:56 -08:00
Leonardo de Moura
a9276c8834 fix(runtime/object): incorrect { 2019-02-23 17:16:49 -08:00
Leonardo de Moura
61f06fbf8e chore(boot): update 2019-02-23 09:16:29 -08:00
Leonardo de Moura
313fd69e8c feat(library/compiler/borrowed_annotation): mark objects as owned when stored in constructors
@kha
2019-02-23 09:12:53 -08:00
Leonardo de Moura
483125f828 test(tests/playground/rbmap): rbmap in OCaml 2019-02-22 17:43:27 -08:00
Leonardo de Moura
b971db6c11 chore(boot): update 2019-02-22 16:09:48 -08:00
Leonardo de Moura
d23216e3ee fix(library/compiler/llnf): bug at explicit_rc_fn 2019-02-22 16:01:52 -08:00
Leonardo de Moura
07aa990f22 fix(library/compiler/borrowed_annotation): ensure that exported functions do not take borrowed arguments
In the future, we should automatically generate wrappers that make all
adjustments for us.
2019-02-22 15:32:30 -08:00
Leonardo de Moura
b1b75c7c2e feat(library/compiler): borrow inference procedure 2019-02-22 15:23:42 -08:00
Leonardo de Moura
ba43d355b7 feat(library/compiler): add borrowed annotation inference skeleton 2019-02-22 11:14:38 -08:00
Leonardo de Moura
6646d7d62c chore(boot): update 2019-02-22 10:19:39 -08:00
Leonardo de Moura
01922794c5 fix(library/compiler/llnf): mk_boxed_version must take care of borrowed arguments and result 2019-02-22 10:18:17 -08:00
Leonardo de Moura
20c877b277 chore(library/init/io): add inline 2019-02-22 09:55:36 -08:00
Leonardo de Moura
778e7e41f9 refactor(library/init/data/rbmap/basic): pass ins node-cell to balance1 and balance2.
The idea is to reuse the cell. The trick is like the one we used for
improving state_t. It seems to work pretty well. Now, the Lean
version is 29% slower than the C++ one.

cc @kha
2019-02-20 18:27:58 -08:00
Leonardo de Moura
835718955f refactor(library/init/data/rbmap/basic): store color in the node
@kha Now the Lean version is approx. 50% slower than the C++ version.
2019-02-20 17:52:03 -08:00
Leonardo de Moura
f91a37e686 chore(boot): update 2019-02-20 17:06:02 -08:00
Leonardo de Moura
ac9e37ed86 feat(library/compiler/llnf): we postpone the simplification of 1-reachable and all-eq cases_on expressions
Reason: the `cases_on`-expressions are used to guide
`insert_reset_reuse_fn`. The new `simp_cases` simplifier applies the
1-reachable and all-eq cases_on expression simplifications after
`insert_reset_reuse_fn` is executed.
2019-02-20 17:00:50 -08:00
Leonardo de Moura
35adf5f540 feat(library/compiler/llnf): avoid unfruitful reuse instruction replacements 2019-02-20 16:34:46 -08:00
Leonardo de Moura
a068c91e50 chore(boot): update 2019-02-20 16:20:22 -08:00
Leonardo de Moura
54a89dabb7 feat(library/compiler/llnf): new reset/reuse insertion procedure 2019-02-20 16:12:58 -08:00
Leonardo de Moura
937b947938 feat(library/compiler/llnf): decorate _cnstr instruction with inductive type name 2019-02-20 14:45:35 -08:00
Leonardo de Moura
b8cee758a5 feat(library/compiler/llnf): add push_proj_fn 2019-02-20 13:20:27 -08:00
Leonardo de Moura
2f218f7ec0 refactor(library/compiler/llnf): remove reset/reuse insertion from to_llnf_fn
`to_llnf_fn` now produces an IR similar to the \lambda_pure in our paper.
2019-02-20 11:16:29 -08:00
Leonardo de Moura
8decfcae74 test(tests/playground): manually optimized rbmap3 2019-02-20 11:00:54 -08:00
Leonardo de Moura
1fc058503d fix(tests/playground/rbmap3): bug 2019-02-19 22:40:22 -08:00
Leonardo de Moura
3e8c8bf3a1 chore(tests/playground/rbmap2): remove debugging options 2019-02-19 22:34:38 -08:00
Leonardo de Moura
0cbf587a00 chore(boot): update 2019-02-19 22:17:57 -08:00
Leonardo de Moura
75ad042c66 feat(library/compiler/llnf): improve reuse/reset insertion
It is now closer to the procedure at reuse.txt
2019-02-19 22:14:29 -08:00
Leonardo de Moura
5db219aae5 test(tests/playground): rbmap example
@kha The Lean rbmap is 3x slower than the C++ rb_map.
I tried two different implementations: rbmap2 (Appel's Coq
implementation), and rbmap3 (tries to simulate the C++ version).
I believe rbmap3 is broken since it is too slow.
I have also identified missing reset/reuse opportunities.
The actual implementation misses a case the simple code at reuse.txt gets :(
rbmap3 also exposes the "TODO(Leo): improve this" at library/compiler/reduce_arity.cpp
2019-02-19 19:01:51 -08:00
Leonardo de Moura
6276d1a7f1 feat(library/compiler/emit_cpp): avoid reset field instructions when reuse instruction is guaranteed to be executed
expr_const_folding.lean takes 3 secs now.
2019-02-19 13:44:46 -08:00
Leonardo de Moura
e2eeccdb2a chore(boot): update 2019-02-19 13:06:33 -08:00
Leonardo de Moura
fe1d17583c feat(library/compiler/emit_cpp): special support for (proj|inc)*;reset sequences
We save inc/dec operations. It improved the performance of
`expr_const_folding.lean`. On my Linux desktop
Before: 3.7 secs
After:  3.1 secs

cc @kha
2019-02-19 13:06:22 -08:00
Sebastian Ullrich
76753a0696 test(tests/playground/expr_const_folding): add Swift translation 2019-02-19 11:24:10 +01:00
Leonardo de Moura
b739d7f343 chore(boot): update 2019-02-18 20:53:04 -08:00
Leonardo de Moura
00aa78fffc feat(library/compiler/llnf): given y := _unbox.n x, mark x as an unboxed scalar if n < sizeof(void*) 2019-02-18 20:52:02 -08:00