Commit Graph

422 Commits

Author SHA1 Message Date
Vincent St-Amour
b18f2353ca Generalize naturals to integers to minimize annotations on mutated variables. 2010-08-05 09:04:25 -04:00
Vincent St-Amour
b1e744b1e1 Fixed tests that used complex literals. 2010-08-05 09:04:24 -04:00
Vincent St-Amour
bdf84f371d Optimize coercion of integer literals. 2010-08-05 09:04:23 -04:00
Vincent St-Amour
1fb68707fc Fixed a test. 2010-08-05 09:04:23 -04:00
Vincent St-Amour
fb31a6556e Added optimization for make-polar 2010-08-05 09:04:22 -04:00
Vincent St-Amour
b47a77dd57 Eliminate user-introduced boxing. 2010-08-02 21:33:30 -04:00
Sam Tobin-Hochstadt
431ff8d794 Don't treat Error types as potentially non-regular. (Reported by SK) 2010-08-02 15:41:42 -04:00
Vincent St-Amour
27f8279711 Extended use-site analysis to look through trivial rebindings, to support for loops. 2010-07-29 18:29:59 -04:00
Vincent St-Amour
260de85a6e Make sure that let-bound functions don't escape through a rhs before we change their interface. 2010-07-29 18:29:58 -04:00
Vincent St-Amour
f08456cf07 Extended unboxing of let-bound functions to support let loops. 2010-07-29 18:29:57 -04:00
Vincent St-Amour
3e9e5560bf Be more aggressive when unboxing let bindings. 2010-07-29 18:29:54 -04:00
Vincent St-Amour
bb14424918 More tests for unboxed args of let-bound functions. 2010-07-29 18:29:54 -04:00
Vincent St-Amour
9d471df8b9 Added unboxed arguments to let-bound functions. 2010-07-29 18:29:53 -04:00
Vincent St-Amour
b0d299d1b8 Added unboxed letrec-syntaxes+values bindings. 2010-07-29 18:29:52 -04:00
Vincent St-Amour
8dc23d43eb Added unboxed letrec bindings. 2010-07-29 18:29:52 -04:00
Vincent St-Amour
4803eafa67 Fixed a bug with exact complexes. 2010-07-25 22:15:18 -04:00
Vincent St-Amour
ec39ea5f33 Added one more test for unboxed let bindings. 2010-07-24 17:01:23 -04:00
Vincent St-Amour
5d86813267 Fixed a test that could not work because of shadowing in hand-optimized code. 2010-07-23 18:52:46 -04:00
Vincent St-Amour
ea580e6ff8 Added a test to the optimizer. 2010-07-23 18:52:43 -04:00
Vincent St-Amour
83987fffac let bindings of inexact-complex numbers can be replaced by bindings
for each of their components.

This allows unboxing of intermediate results that are bound and only
ever used in positions where they would be unboxed.
2010-07-23 18:52:42 -04:00
Vincent St-Amour
063b87697a Optimized extracting parts of inexact complexes. 2010-07-23 18:52:42 -04:00
Vincent St-Amour
0493e6f762 Refactoring of the optimizer. 2010-07-23 18:52:41 -04:00
Sam Tobin-Hochstadt
5bb730f72c Optimize (apply + (map f l)) to avoid the intermediate list. 2010-07-23 14:11:40 -04:00
Vincent St-Amour
0ee0886cab Optimizations on one-argument cases of arithmetic operations. 2010-07-21 21:09:43 -04:00
Vincent St-Amour
4e944f73ab Added optimization for string-length and bytes-length. 2010-07-21 21:09:42 -04:00
Vincent St-Amour
d6ce6e664f Added box optimizations. 2010-07-21 21:09:42 -04:00
Vincent St-Amour
b13075a1c0 Changed the interface to typed racket's test harness. 2010-07-21 21:09:40 -04:00
Vincent St-Amour
47195410cb Added optimization for zero?. 2010-07-21 21:09:40 -04:00
Vincent St-Amour
8aa4fae613 Added whitespace to the typed racket test harness. 2010-07-16 19:08:21 -04:00
Vincent St-Amour
8563f02ba8 Don't abort typed racket's tests if the main tests fail. 2010-07-16 19:08:21 -04:00
Vincent St-Amour
60bfce14bc Fixed unsafe optimization that considered floats as complexes. 2010-07-16 19:08:20 -04:00
Vincent St-Amour
b8b852dbc1 Added a test for inexact imaginaries. 2010-07-16 19:08:20 -04:00
Vincent St-Amour
4d5b50dee9 Further fixes in overlap checking.
Rhss of code dispatching on overlapping structs are no longer
considered dead, and as such, are now typechecked.

Had to fix a test that passed only because some not-really-dead code
was not being typechecked.
2010-07-16 19:08:19 -04:00
Vincent St-Amour
fc29e7e856 Added mutable pair optimizations. 2010-07-16 12:22:16 -04:00
Vincent St-Amour
f21454e711 Fixed an infinite loop. 2010-07-16 12:22:16 -04:00
Vincent St-Amour
c587038b33 The imaginary parts of reals are ignored when doing complex division. 2010-07-16 12:22:15 -04:00
Vincent St-Amour
443d8b9f91 Fixnums and integers can now be coerced for complex operations. 2010-07-16 12:22:15 -04:00
Vincent St-Amour
c645aa7ebc The imaginary parts of inexact reals are ignored when doing complex multiplication. 2010-07-16 12:22:15 -04:00
Vincent St-Amour
b0788372ea Fixed bugs in the tests. 2010-07-16 12:22:14 -04:00
Vincent St-Amour
566aeedb59 Better error reporting by the optimizer's test harness. 2010-07-16 12:22:14 -04:00
Vincent St-Amour
7fb1b41a28 The optimizer's test harness now makes sure that optimized and
non-optimized versions of the same code evaluate to the same thing.

Unfortunately, this leads to a lot of code duplication. We can't
abstract over optimization like we do for the benchmarks since the
wrapper module would interfere with testing expanded code for
equality.
2010-07-16 12:22:14 -04:00
Vincent St-Amour
748e9e47ad The imaginary parts of inexact reals are ignored when doing complex
addition or subtraction.
2010-07-16 12:22:13 -04:00
Vincent St-Amour
025af5b815 Added coercions for floats with unboxed complex operations.
However, this generates superfluous operations involving their
imaginary part of 0.
2010-07-16 12:22:13 -04:00
Vincent St-Amour
fff71e6a1d Enabled optimization of complex conjugate at the top level of complex operations. 2010-07-16 12:22:12 -04:00
Vincent St-Amour
063211d922 Added unboxed complex conjugate. 2010-07-16 12:22:12 -04:00
Vincent St-Amour
0b0da84eba Added optimizations for iterating over vectors and strings. 2010-07-16 12:22:12 -04:00
Vincent St-Amour
1e550139aa Added dead code elimination. 2010-07-16 12:22:11 -04:00
Vincent St-Amour
4e6fc3154b Added a test for cross-module struct optimization. 2010-07-16 12:22:10 -04:00
Vincent St-Amour
7853d33349 Improved unboxed complex operations.
Intermediate results are kept as unboxed floats as long as we stay
within complex arithmetic code.
2010-07-07 19:42:56 -04:00
Vincent St-Amour
7921074eef Avoid boxing intermediate results when doing multiple complex
operations in a row.

However, because of values and let-values, we lose float unboxing.
If we have a single complex operation, this is much slower than my
previous implementation (though still faster than generic
operations). With 2 complex operations, the new implementation becomes
faster.
2010-07-07 19:42:55 -04:00