Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: new approach to efficiently hashing 1, 1.0, big(1), the same. #6624

Merged
merged 20 commits into from
May 7, 2014
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
155a6c8
WIP: new approach to efficiently hashing 1, 1.0, big(1), the same.
StefanKarpinski Feb 24, 2014
b3a7c84
decompose: fix documentation of decompose for rational hashing.
StefanKarpinski Apr 24, 2014
dadc7cf
define hash(x) = hash(x, zero(Uint)) in a single place; fix bugs.
StefanKarpinski Apr 24, 2014
316eeda
MathConst: == and hash
StefanKarpinski Apr 24, 2014
f791029
move generic rational hashing definitions into hashing2.jl
StefanKarpinski Apr 24, 2014
3696968
Work around LLVM's dickish undefined constant folding behavior.
StefanKarpinski Apr 25, 2014
ef79b13
generic hash(Real) optimization: remove type assert on `decompose`.
StefanKarpinski Apr 25, 2014
85afdbb
More streamlined hashing for smallish rational types (≤ 64-bits).
StefanKarpinski Apr 25, 2014
f5fd830
signbit: return a boolean value, instead of an Int.
StefanKarpinski Apr 27, 2014
660c018
isnan, isinf, isfinite: improved generic definitions.
StefanKarpinski Apr 27, 2014
04908d4
move hash(WeakRef) into base/hashing.jl also (not needed so early).
StefanKarpinski Apr 28, 2014
1c8b7d1
hashing: make new hashing work on 32-bit systems.
StefanKarpinski Apr 30, 2014
737ad6e
isequal, isless: bring comparison and sorting in line with new hashing.
StefanKarpinski Apr 28, 2014
f11b2e8
`d[k] = v`: replace key when new values are assigned in dicts.
StefanKarpinski Apr 30, 2014
5a834b2
Merge branch 'master' into sk/hashing
JeffBezanson May 2, 2014
f9cb1e3
workaround for the Type{()} error
JeffBezanson May 2, 2014
b5e0b73
update docs for == and isequal
JeffBezanson May 2, 2014
9a48950
doc: some wording adjustments for isequal.
StefanKarpinski May 2, 2014
9738dd3
restore former behavior of isless as a total order
JeffBezanson May 7, 2014
607558a
Merge branch 'master' of github.com:JuliaLang/julia into sk/hashing
JeffBezanson May 7, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'master' of github.com:JuliaLang/julia into sk/hashing
Conflicts:
	base/operators.jl
JeffBezanson committed May 7, 2014
commit 607558a2e869e2212b46cddbae799a7a30925e79
5 changes: 5 additions & 0 deletions base/operators.jl
Original file line number Diff line number Diff line change
@@ -27,14 +27,17 @@ isless(x::FloatingPoint, y::Real ) = (!isnan(x) & isnan(y)) | (signbit(x
const ≠ = !=
const ≡ = is
!==(x,y) = !is(x,y)
const ≢ = !==

<(x,y) = isless(x,y)
>(x,y) = y < x
<=(x,y) = !(y < x)
const ≤ = <=
>=(x,y) = (y <= x)
const ≥ = >=
.>(x,y) = y .< x
.>=(x,y) = y .<= x
const .≥ = .>=

# this definition allows Number types to implement < instead of isless,
# which is more idiomatic:
@@ -98,6 +101,8 @@ end
.!=(x::Number,y::Number) = x != y
.< (x::Real,y::Real) = x < y
.<=(x::Real,y::Real) = x <= y
const .≤ = .<=
const .≠ = .!=

# core << >> and >>> takes Int32 as second arg
<<(x,y::Int32) = no_op_err("<<", typeof(x))
You are viewing a condensed version of this merge commit. You can view the full changes here.