Commit Graph

27786 Commits (28dcd0667a174e015d97849889230f404113d3c8)

Author SHA1 Message Date
Jon Harper 5424ad5586 math.integers, bignum/f, improve performance.
This changes avoids looping many times if the denominator is a power of
2. After this change, the implementation matches the linked sbcl
algorithm.  This was probably a mistake done when porting the algorithm.
Basically, as an optimization, all trailing zeros are removed from the
base2 representation of the denominator to have smaller bignums to
divide. But the previous factor implementation didn't take this into
account when making the initial guess of the shift of the numerator to
obtain a result in the range [2^54-1,2^53]. The loop would then correct
the initial guess by a factor of 2 at each iteration, so it would run as
many iteration as the denominator base2 power reduction, instead of only
a few times. For pathological cases, the speed up is huge (10^4):
1 1000 2^ bignum/f
2015-07-26 12:33:55 -07:00
Jon Harper cc6d90a096 math.integers, fix bignum/f for results in ]0x1.0p-1022,0x0.4p-1022] 2015-07-26 12:33:55 -07:00
Doug Coleman f3c85e0598 math.vectors.conversion: [foo] for words that make quots is ok, but [[foo]] is overboard. change to ([foo]) 2015-07-26 12:24:23 -07:00
John Benediktsson 155c5ab823 fix a couple string escapes. 2015-07-26 08:32:40 -07:00
Doug Coleman 1fcf96cada factor: remove """ string syntax for now. there are HEREDOC:, STRING:, escaping \", and something else soon. 2015-07-25 22:59:56 -07:00
John Benediktsson 5fbe6aa9e6 ui.gadgets.labels: respect the labels background and foreground. 2015-07-25 22:38:34 -07:00
Doug Coleman b9c0255fcc debugger: final fix for path/file rename 2015-07-24 10:56:31 -07:00
Doug Coleman 3f6634650d fuel: fix load 2015-07-24 00:32:51 -07:00
Doug Coleman ee9c221eb0 mason.test: fix file->path 2015-07-23 23:49:02 -07:00
Doug Coleman 117727d444 parser, source-files: you need to bootstrap after this patch.
cleans up some file vs path naming.

file -> current-source-file
file -> current-test-file somewhere else
source-file -> path>source-file
source-file-tuple -> source-file
2015-07-23 22:03:43 -07:00
John Benediktsson 7b02c23f54 tools.image-analyzer.gc-info: fix for gml moving to unmaintained. 2015-07-22 08:18:31 -07:00
Doug Coleman 6c29da1d16 euler: move to unmaintained. 2015-07-21 19:35:40 -07:00
Doug Coleman de8390dfad pcre: fix test 2015-07-21 19:33:54 -07:00
Doug Coleman 89ffe8fa82 io.encodints.iso2022: fix unit tests 2015-07-21 19:33:08 -07:00
Doug Coleman e264c26b53 infix: fix infix syntax 2015-07-21 18:00:01 -07:00
John Benediktsson 255b4fc823 cpu.x86: fix article title help-lint. 2015-07-21 17:55:52 -07:00
Doug Coleman 5bf77102fc fonts.syntax: not sure what this does, moving to unmaintained for now. 2015-07-21 17:33:53 -07:00
Doug Coleman 81f9e0405c gml: move to unmaintained for now. 2015-07-21 17:33:53 -07:00
Doug Coleman cfb1b973ff variants: Add a ";" to VARIANT-MEMBER: 2015-07-21 17:33:52 -07:00
Doug Coleman ccf9e75b79 pair-rocket: move to unmaintained for now. 2015-07-21 17:33:47 -07:00
Doug Coleman 97d29b8f57 multiline: disable test that defines a weird syntax word. 2015-07-21 17:33:14 -07:00
Doug Coleman 269ea7a291 persistency: not sure what it does, no docs, no tests. weird parsing word. move to unmaintained. 2015-07-21 17:33:14 -07:00
Doug Coleman b4198dbee6 cuda: fix CUDA-LIBRARY: to take a proper path that could have spaces in it 2015-07-21 17:33:14 -07:00
Doug Coleman b39d4c54a4 regexp: remove R" R[ and R{, there are still plenty of options and better ones to come. 2015-07-21 17:33:14 -07:00
Doug Coleman c1a330ac7a io.encodings.iso2022: use $ instead of making ESC a parsing word. 2015-07-21 17:33:14 -07:00
Doug Coleman fef2a55f46 specialized: no docs, no tests, banished for now. 2015-07-21 17:33:14 -07:00
Doug Coleman 429ecc9811 roles: TUPLE: -> ROLES-TUPLE: for now 2015-07-21 17:33:13 -07:00
Doug Coleman af3605bfe6 math.extras: .. and ... are cool but not used and can come back soon. 2015-07-21 17:33:13 -07:00
Doug Coleman e1e9182c6e extra: move multimethods and pong to unmaintained for now. 2015-07-21 17:33:13 -07:00
Björn Lindqvist e41aef9a50 cpu.x86: use push and pop when emitting %prologue and %epilogue
push/pop REG has the same effect as sub/add rsp, 8 so use them instead
when applicable to generate a little shorter code
2015-07-21 16:22:33 -07:00
Doug Coleman 35d81c742d math.derivatives: Add a ; to the syntax for derivatives so the parsing word doesn't have to introspect its input arity. 2015-07-21 12:35:08 -07:00
Doug Coleman 91bda9066d variables: move to unmaintained. nothing uses this experimental vocab and
we can look at merging its ideas into core soon, but move for now.
2015-07-21 12:10:41 -07:00
Doug Coleman cf0cb4aedc nested-comments: remove this vocab. we have /* */ which is good enough for now.
broken case:
(*
: print-broken ( -- ) "*)" ;
*)

not worth fixing, please don't bring this back :)
its functionality will be replaced soon.
2015-07-21 12:07:53 -07:00
Doug Coleman 280177279a dns: remove nested-comment, add comment about resolve-host 2015-07-21 12:07:04 -07:00
Doug Coleman da5564bd3f multiline: remove unused DELIMITED: word. 2015-07-21 12:02:15 -07:00
Doug Coleman 1b4048232a code-arrays: move to unmaintained 2015-07-21 11:39:47 -07:00
John Benediktsson 9ec74563ba compiler.cfg: use "f [ or ] reduce" instead of "map [ ] any?" 2015-07-21 09:54:44 -07:00
John Benediktsson a79f745a12 bloom-filters: use all? instead of "map [ ] all?". 2015-07-21 09:54:31 -07:00
Björn Lindqvist d24733e703 compiler.cfg.build-stack-frame: refactoring which removes the
frame-required? variable
2015-07-21 13:40:50 +02:00
Björn Lindqvist 80ea6b8997 compiler.*: fix the tests that broke because i removed the stack-frame variable 2015-07-21 13:40:49 +02:00
Björn Lindqvist eba939c0f2 compiler.cfg.stacks.map: this vocab is subsumed by
compiler.cfg.stacks.padding which works much better
2015-07-21 13:36:11 +02:00
Björn Lindqvist bc8525bf5b compiler.cfg.build-stack-frame: the frame-required? variable needs to be
reset so that stack frames aren't included in words that doesn't need them
2015-07-21 13:35:22 +02:00
Björn Lindqvist b5333ec7aa compiler.cfg.stack-frame: using cfg get stack-frame>> instead of the
stack-frame variable that pointed to the same instance
2015-07-21 13:35:22 +02:00
John Benediktsson 5eec781b40 use ``if*`` instead of ``dup [ ] [ drop ] if``. 2015-07-20 22:24:30 -07:00
John Benediktsson bbde85f56b vocabs.loader: fix tests. 2015-07-20 21:11:16 -07:00
John Benediktsson 7327b8bdd4 vocabs.loader: make require-all throw restarts.
We only want to catch the restarts in mason, so make a special
load-no-restarts that will catch the failures and print them out
the same way it worked before.
2015-07-20 17:35:22 -07:00
John Benediktsson 507dac7599 locals.parser: don't clone the manifest, just pop used words.
It seems the manifest gets cloned on restarts, which makes unuse-words
not work since it just checks ``eq?``. If we pop the last qualified
vocabs, then everything works.
2015-07-20 17:35:22 -07:00
John Benediktsson 529a57bbb4 Revert "hints: add hints to index."
This reverts commit 96ce04755a.
2015-07-20 17:35:22 -07:00
John Benediktsson 8a4a86db64 vocabs.prettyprint: lookup syntax vocab only once in pprint-using. 2015-07-20 17:35:22 -07:00
Doug Coleman bcc78ab220 basis: whitespace. 2015-07-20 17:13:52 -07:00