| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \
| |/ /
|/| | |
unset inappropriate execute bits
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
I imagine these date back to old Subversion days and are probably the
result of inadvertent commits from Windows users with vcs client
configs.
having the bit set isn't really harmful most of the time,
but it's just not right, and it makes the files stand out in directory
listings for no reason
|
|\ \ \
| | | |
| | | | |
SI-9407 Vector implementation bit-shift bugfix
|
| |/ /
| | |
| | |
| | |
| | |
| | | |
Fixed logically incorrect or unnecessary code in Vector as reported by Dirk Toewe.
No tests. Because of the size of the vectors, tests would be impractically slow. Also, the logic is quite clear: when you are recursing through a tree, using the wrong bit shift means you hit the wrong part of the tree, and when you create and then always overwrite a mutable var, you should just not do it to begin with.
|
|\ \ \
| | | |
| | | | |
Performance optimization - Iterator
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Rewrite of span to avoid double-indirection of `.buffered` and to avoid use of `mutable.Queue` unless it is absolutely necessary. Rewrite of `span` and `dropWhile` to also avoid `.buffered` (less DRY but single vs. double indirection and object allocation).
Performance improvements:
```
method reason
=========== ===============================================================
collect 2.3x faster on small collections, 1.5x on large
span 1.6-1.7x faster on small collections
0.85x-1.8x slower/faster on large collections
depending on how much must be cached (0.85x all, 1.8x none)
dropWhile 1.2x faster on small collections, half the garbage
```
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Tightened up bytecode, logic, and/or performance by using local return instead of a mutable variable in several methods.
Performance/bytecode size improvements (smaller bytecode = better inlining)
```
method reason
=========== ===============================================================
flatMap hasNext bytecode 34 bytes down from 62
find bytecode 41 bytes instead of 53
indexWhere 1.5x faster on small collections (some contexts)
indexOf bytecode 89 bytes instead of 110
```
|
|\ \ \ \
| | | | |
| | | | | |
fix typos/spelling
|
| | |/ /
| |/| | |
|
|\ \ \ \
| |_|_|/
|/| | | |
Link to completed value classes SIP page instead of pending version
|
| |/ / |
|
|\ \ \
| | | |
| | | | |
Update Java and Sun URLs to replacement Java and Oracle URLs
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
For each URL
- Where it redirected the target of the redirection was used
- Where is no longer existed a replacement was selected
|
|\ \ \ \
| |/ / /
|/| | | |
SI-9424 Clarify behavior of PriorityQueue toString
|
| |/ /
| | |
| | |
| | |
| | |
| | | |
Clarified that PriorityQueue will not print in order and gave an example of a workaround if one needs it.
Documentation change only; no tests.
|
|\ \ \
| |/ /
|/| | |
Improve comment in Option.collect example
|
| | | |
|
|\ \ \
| | | |
| | | | |
Add link to online version of Programming in Scala
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
toSet needs to rebuild some child classes, but not others, as toSet is
allowed to widen element types (which the invariant Set normally cannot do),
and some sets rely upon their invariance. Thus, sets that rely upon their
invariance now rebuild themselves into a generic set upon toSet, while those
that do not just sit there.
Note: there was a similar patch previously that fixed the same problem, but
this is a reimplementation to circumvent license issues.
Note: the newBuilder method was benchmarked as (surprisingly!) the most
efficient way to create small sets, so it is used where sets may need to
be rebuild.
|
|/ / |
|
|\ \
| | |
| | | |
Revert "SI-8346 Rebuild invariant sets in #toSet, avoiding CCE"
|
| |/ |
|
|\ \
| | |
| | | |
Fix documentation of Stream.filter introduced in 13f30c
|
| |/ |
|
|/ |
|
|\
| |
| | |
Fix the bug in the example in scala.sys.process
|
| | |
|
| |
| |
| | |
There's no `!` method with argument type `ProcessIO`. I suppose this is intended to be `run`.
|
|\ \
| | |
| | | |
SI-8362: AbstractPromise extends AtomicReference, avoids sun.misc.Unsafe
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
To avoid `sun.misc.Unsafe`, which is not supported on Google App Engine.
Deprecate `AbstractPromise` --> extend `j.u.c.atomic.AtomicReference` directly.
`AtomicReference.compareAndSet()` should also provide better performance on
HotSpot, which compiles it down to the machine's CAS instruction.
The binary incompatible change is ok because it's in an internal package.
I can't think of any real issue with adding a superclass (which contributes
only final methods) to a class in an implementation package (as long as
those methods were not introduced in any illicit subclasses of said class).
Instead of changing `DefaultPromise`'s super class, let's be more
conservative, and do it closest to the source. This is both clearer and more
focussed, leaving those subclasses of AbstractPromise we never heard of
unaffected.
Genesis of the commit: since the work on `Future` performance, `AbstractPromise`
is using `Unsafe`, breaking the ability for `Future` to be executed on GAE. At
that time, viktorklang suggested to implement a fallback in case `Unsafe` is
not available. carey proposed an implementation, and mchv submitted a patch,
which was refined by adriaanm.
|
|\ \ \
| | | |
| | | | |
Stop mapping to Unit when executing finally code.
|
| | | |
| | | |
| | | |
| | | | |
Finally.invoke has result type Unit so foreach is sufficient here.
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Using length instead of size on String to avoid a conversion call.
This dump confirms there is a conversion to StringOps when using size.
object StringSize {
val s = "hi"
println(s.size)
}
$ scalac -Xprint:typer StringSize.scala
[[syntax trees at end of typer]] // StringSize.scala
package <empty> {
object StringSize extends scala.AnyRef {
def <init>(): StringSize.type = {
StringSize.super.<init>();
()
};
private[this] val s: String = "hi";
<stable> <accessor> def s: String = StringSize.this.s;
scala.this.Predef.println(scala.this.Predef.augmentString(StringSize.this.s).size)
}
}
|
|/ /
| |
| |
| |
| | |
Option(null) is None while Option(v) is Some(v) which makes the null
test redundant.
|
| | |
|
|/ |
|
|\
| |
| | |
Fix 27 typos (p-r)
|
| | |
|
|\ \
| |/
|/| |
SI-9206 REPL custom bits
|
| |
| |
| |
| |
| |
| |
| |
| | |
Can be specified by `-Dscala.repl.welcome=Greeting` or in properties
file. It takes the same format arguments as the prompt, viz, version,
Java version and JVM name.
It can be disabled by `-Dscala.repl.welcome` with no text.
|
| | |
|
|\ \
| |/
|/| |
Fix 25 typos (g-i)
|
| | |
|
|\ \
| |/
|/| |
SI-9206 Fix REPL code indentation
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, handy `sys.BooleanProp.keyExists` ignored the
property value. While trying not to make any real estate puns,
this commit will let it go false if a value is supplied that
is not true in the usual Java sense. But what is truth?
Allows `scala -Dscala.color=off`, for example.
|
| | |
|
|\ \
| |/
|/| |
SI-8930 - Vector updated, +:, and :+ slow when typed as Seq[A]
|
| |
| |
| |
| |
| |
| | |
Vector was intercepting only the IndexedSeq CanBuildFrom to quickly generate new vectors. Now it intercepts immutable.Seq and collection.Seq as well.
There are other possibilities (collection.IndexedSeq), but they will probably arise rarely, and to avoid an absurdly long set of checks we would need a marker trait (that is not binary compatible).
|
|\ \
| | |
| | | |
Doc fixes
|