| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
on pattern matching for updating the tree.
|
| |
|
| |
|
| |
|
|
|
|
| |
already does so).
|
|
|
|
|
| |
Use ArrayStack instead of Stack in TreeIterator for slightly increased
performance.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
type parameter A.
|
| |
|
| |
|
|
|
|
|
| |
changes the operation from O(n log n) to O(n) and allows for more
structural sharing.
|
|
|
|
|
|
| |
TreeMap/TreeSet by splitting the underlying RedBlack tree. This
makes the operation O(log n) instead of O(n) and allows more
structural sharing.
|
|
|
|
|
| |
to ensure TreeSet/TreeMap 'range' operations are O(log n) instead
of O(n).
|
| |
|
|
|
|
| |
TreeMap/TreeSet.
|
|
|
|
| |
performance is much better than '++' based iterator.
|
|
|
|
|
|
|
| |
This turns iterator creation from an O(n) operation into an
O(log n) operation. Unfortunately, it halves actual iteration
speed (consuming the iterator fully), probably due to the many
by-name closures that are needed.
|
|\ \ \
| | | |
| | | |
| | | | |
'kepler/topic/reifyclosuretests', 'kepler/topic/antscalacheck', 'szabolcsberecz/SI-5104', 'kepler/ticket/5334' and 'kepler/topic/miscfixes' into develop
|
| | |/ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The bug was caused by the inconsistency between j.l.Math.min() and
j.l.Double.compareTo() wrt NaN (j.l.Math.min() considers NaN to be
less than any other value while j.l.Double.compareTo() says it's
greater...)
The fix changes Ordering.{FloatOrdering,DoubleOrdering) to base
it's results on primitive comparisons and math.{min,max} instead
of j.l.{Float,Double}.compareTo()
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
factored out some of the optimizing codegen that had snuck into treemakers (guardtreemaker)
removed `caseResult`, back to just `one`
no longer emitting intermediate `one`s (using guard instead -- when not optimizing)
so uncurry can't accidentally blow them away (it removes the `one` that represents the case's result,
but should leave intermediate computation alone)
still TODO: reusing-treemakers
sharing prefixes of length 1 helps
inlining suffix of alternatives if small enough
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
introducing two mutable variables per pattern match: matchRes and keepGoing
keepGoing denotes whether the result was Some or None,
and matchRes holds the Some's contents or the right zero for the match's type
Race(() => fastMatch(list), () => virtMatch_no_option(list))(100000).converge() is a virtual tie on my machine after this
see https://gist.github.com/1400910
conveniently also works around SI-5245
don't assign to Unit-typed var's, in fact, make matchRes a val when its only prospect in life is to be unit-valued
propagate eventual type for matchRes thru codegen
so that we can have more robust checks for unit¬hing, when assignment makes no sense
also, added a hack to caseResult to avoid boxed units in
if(keepGoing) { matchRes = ... } else zero
after erasure, we get
if(keepGoing) { matchRes = ...; BoxedUNIT } else zero
genicode broke because i was sharing trees:
[scalacfork] error: java.lang.AssertionError: assertion failed: type error: can't convert from UNIT to REF(class Object) in unit ScalaSig.scala at source-/Users/adriaan/git/scala-dev/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSig.scala,line-26,offset=868
fixed by duplicating -- so be it (for now -- make this more fine-grained, more efficient)
dodging inliner issues with one/zero (it won't inline, so also directly inline those methods)
|
|\
| |
| |
| | |
'jsuereth/fix-5053-view-unzip' into develop
|
| |
| |
| |
| |
| |
| |
| |
| | |
* Added unzip and unzip3 to TraversableViewLike
* Added partest tests for unzip on views returning specific collection types.
Closes SI-5053
Review by @paulp
|
| |
| |
| |
| |
| | |
Deprecated since 2.8.0 but causing far too much inconvenience
by not being present.
|
| |
| |
| |
| |
| |
| |
| | |
This is not a long-term implementation - I haven't even benchmarked
it -- don't worry. I did find a fairly gross bug in the version I
checked in a few days ago so I wanted to erase that from the repository
memory for the weekend.
|
| |\ |
|
| | |
| | |
| | |
| | |
| | | |
Copy the documentation from Map#withDefault() that get(), contains(),
iterator(), and keys() keys are not affected by withDefaultValue().
|
| | |
| | |
| | |
| | | |
To get the same benefit as in Range. Review by @prokpec.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This makes code like
0 to 100 foreach (x += _)
as fast as (often faster than, in fact) a while loop. See the
comment in Range for the gory details. More investigation should
be done regarding total impact on inlining behavior.
Review by @odersky.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The hash code is further improved by using a special value in the hash sets
called a `seed`. For sequential hash tables, this value depends on the size
of the hash table. It determines the number of bits the hashcode should be
rotated. This ensures that hash tables with different sizes use different
bits to compute the position of the element. This way traversing the elements
of the source hash table will yield them in the order where they had similar
hashcodes (and hence, positions) in the source table, but different ones in
the destination table.
Ideally, in the future we want to be able to have a family of hash functions
and assign a different hash function from that family to each hash table
instance. That would statistically almost completely eliminate the possibility
that the hash table element traversal causes excessive collisions.
I should probably @mention extempore here.
|
|\ \ \
| | | |
| | | |
| | | | |
'fedgehog/docs_fix_for_scala.Either.cond___SI-5113' and 'kepler/ticket/5266' into develop
|
| | |/ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The @migration annotation can now be used like @deprecation.
Old syntax is still supported, but deprecated.
Improve wording and consistency of migration messages, migration
warnings also print the version in which the change occurred now.
Partially fixes SI-4990.
|
|/
|
|
|
|
| |
Nobody should be deprecating methods without ensuring that the
implementation doesn't rely on their existence (and the documentation
doesn't still suggest using them.) Made it more internally consistent.
|
|\ |
|
| |
| |
| |
| |
| | |
A bit further down Option's slippery slope of collections methods, but
those sudden implicit conversions to Iterable are legitimately annoying.
|
|/ |
|
|
|
|
|
|
| |
Change scaladoc links in collection classes to point at re-formatted
Collections Overview on docs.scala-lang.org. Fix minor typo:
s/Ummutable/Immutable
|
|
|
|
| |
"The Scala 2.8 Collections API" overview.
|
|\ \
| | |
| | |
| | | |
'ijuma/feature/signum' into develop
|
| |/
| |
| |
| |
| |
| |
| |
| | |
The Java implementation is faster as it doesn't have branches.
java.lang.Math includes implementations of signum for Double and Float,
but I didn't change the ones in scala.math because there is a difference
on how negative zero is handled.
|
|/
|
|
| |
and :+, plus one for ++:.
|