src/runtime: remove extra if check in hashmap set logic
Этот коммит содержится в:
родитель
93654544b3
коммит
8b360ec911
1 изменённых файлов: 0 добавлений и 6 удалений
|
@ -153,12 +153,6 @@ func hashmapLenUnsafePointer(p unsafe.Pointer) int {
|
||||||
func hashmapSet(m *hashmap, key unsafe.Pointer, value unsafe.Pointer, hash uint32) {
|
func hashmapSet(m *hashmap, key unsafe.Pointer, value unsafe.Pointer, hash uint32) {
|
||||||
tophash := hashmapTopHash(hash)
|
tophash := hashmapTopHash(hash)
|
||||||
|
|
||||||
if m.buckets == nil {
|
|
||||||
// No bucket was allocated yet, do so now.
|
|
||||||
m.buckets = unsafe.Pointer(hashmapInsertIntoNewBucket(m, key, value, tophash))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if hashmapShouldGrow(m) {
|
if hashmapShouldGrow(m) {
|
||||||
hashmapGrow(m)
|
hashmapGrow(m)
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче