/
githubmirror
/
julia
Обзор
Документация
Войти
/
githubmirror
/
julia
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/support/ptrhash.c
33 строки
599 B
Cody Tapscott
Optimize `ptrhash` / `htable_t` implementation (#61406)
26 мар 2026, 01:17
Не верифицирован
26 мар 2026, 01:17
d84074a
Код
Авторство
О чём код?
// This file is a part of Julia. License is MIT: https://julialang.org/license /* pointer hash table optimized for storing info about particular values */ #include <stdlib.h> #include <stdio.h> #include <string.h> #include <assert.h> #include <limits.h> #include "dtypes.h" #include "hashing.h" #include "ptrhash.h" #define OP_EQ(x,y) ((x)==(y)) #include "htable.inc" #ifdef __cplusplus extern "C" { #endif static inline uint_t ptrhash_hash(uintptr_t key) JL_NOTSAFEPOINT { return (uint_t)((key >> 4) ^ (key >> 9)); } HTIMPL(ptrhash, ptrhash_hash, OP_EQ) #ifdef __cplusplus } #endif