Skip to content

[WIP] Hash table unification #18790

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

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
c197314
[stdlib] Add struct _HashTable
lorentey Aug 17, 2018
e070194
[stdlib] Improve Set storage layout
lorentey Aug 17, 2018
af9bf57
[runtime] Update layout of empty set singleton instance
lorentey Aug 20, 2018
e1afdf1
[stdlib] Make _stdlib_NSObject_isEqual internal
lorentey Aug 17, 2018
0e8c04b
[stdlib] _makeCollectionDescription(for:,withTypeName:): make internal
lorentey Aug 17, 2018
75924d6
[REMOVE][stdlib] Set._dump(): Temporarily add to aid in debugging
lorentey Aug 17, 2018
5af96e2
[stdlib] _HashTable: Make more members internal
lorentey Aug 17, 2018
9f8fd13
[stdlib] Set.update(with:): optimize storage handling
lorentey Aug 20, 2018
430d4f5
[test] Update names of native Set storage classes
lorentey Aug 20, 2018
1b2b4c1
[stdlib] _HashTable: Introduce capacity(forScale:) and _idealBucket(f…
lorentey Aug 20, 2018
f368b61
[REMOVE][stdlib] Add Set._invariantCheck()
lorentey Aug 20, 2018
b0b8a7c
[REMOVE][stdlib] Add Set._stats
lorentey Aug 20, 2018
6cabc85
[test] Update empty case in Set.removeAll tests
lorentey Aug 21, 2018
9befb45
[stdlib] Set(_cocoa:): New initializer
lorentey Aug 21, 2018
db61471
[stdlib] Set._Variant: Replace static factories with initializers
lorentey Aug 21, 2018
7494109
[stdlib] Update comments
lorentey Aug 21, 2018
06ce462
[stdlib] Generalize _NativeSet.insertNew(_:) and use in more places
lorentey Aug 21, 2018
6487d98
[stdlib] _Bitmap: New value type representing a fixed-size bitmap
lorentey Aug 21, 2018
15fc8fa
[stdlib] Set: Optimize isSubset/isSuperset tests
lorentey Aug 21, 2018
274d9fd
[stdlib] Set: Unify isDisjoint(_:) variants.
lorentey Aug 21, 2018
8ff9dd7
[stdlib] Set: Optimize intersection
lorentey Aug 21, 2018
e37b501
[stdlib] Set: Optimize symmetric difference
lorentey Aug 21, 2018
f2f767c
[stdlib] Set: Optimize formUnion
lorentey Aug 21, 2018
d992010
[stdlib] _HashTable.scale: expose to inlinable code
lorentey Aug 23, 2018
05b2342
[stdlib] _Bitmap: Apply review notes
lorentey Aug 25, 2018
3725eeb
[stdlib] Set: optimize subtraction
lorentey Aug 25, 2018
d91db50
[squash] Fix isStrictSuperset oversight
lorentey Aug 26, 2018
1bb3174
[stdlib] Hasher._Seed: New typealias
lorentey Aug 26, 2018
fe82810
[stdlib] Set: Enable true per-instance seeding
lorentey Aug 26, 2018
2fa564f
[stdlib] _HashTable.MapEntry: Add explicit conformance to Equatable
lorentey Aug 26, 2018
dc833f3
[stdlib] Set: Remove guaranteedNative fastPath
lorentey Aug 27, 2018
adcd435
[squash][stdlib] _SwiftRawSetStorage.seed: Make final
lorentey Aug 28, 2018
bd9cea9
[squash][stdlib] HashTable: Reorder stored properties; remove count f…
lorentey Aug 28, 2018
ad2d062
[squash][stdlib] _HashTable.payloadMask, .unoccupied: Force inlining
lorentey Aug 28, 2018
b28a13a
[squash][stdlib] _HashTable: More force-inlining
lorentey Aug 28, 2018
0f91dd2
[stdlib] _NativeSet.find: Small speedup
lorentey Aug 28, 2018
6a5a42e
[stdlib] _HashTable: make bucketCount a stored property
lorentey Aug 28, 2018
fe17bb6
[stdlib] _HashTable: Make everything inlinable
lorentey Aug 28, 2018
a6bfc9b
[remove][stdlib] More statistics
lorentey Aug 29, 2018
e00f11f
[squash][stdlib] Report Hashable violations with _assertionFailure
lorentey Aug 29, 2018
3b9d453
[stdlib] _HashTable: Rewrite applying some SIMD(ish) tricks
lorentey Sep 3, 2018
d4c4171
[stdlib] Speed up Set.contains
lorentey Sep 8, 2018
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
10 changes: 6 additions & 4 deletions stdlib/public/SwiftShims/GlobalObjects.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@ struct _SwiftDictionaryBodyStorage {
};

struct _SwiftSetBodyStorage {
__swift_intptr_t capacity;
__swift_intptr_t count;
struct _SwiftUnsafeBitMap initializedEntries;
void *keys;
__swift_uint64_t count;
__swift_uint64_t capacity;
__swift_uint64_t scale;
__swift_uint64_t seed0;
__swift_uint64_t seed1;
void *rawElements;
};

struct _SwiftEmptyDictionaryStorage {
Expand Down
1 change: 0 additions & 1 deletion stdlib/public/core/ArrayShared.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ func _deallocateUninitializedArray<Element>(
// Utility method for collections that wish to implement CustomStringConvertible
// and CustomDebugStringConvertible using a bracketed list of elements,
// like an array.
@inlinable // FIXME(sil-serialize-all)
internal func _makeCollectionDescription<C: Collection>
(for items: C, withTypeName type: String?) -> String {
var result = ""
Expand Down
Loading