Skip to content

Commit

Permalink
Merge pull request GaijinEntertainment#662 from GaijinEntertainment/h…
Browse files Browse the repository at this point in the history
…ash_64_z

hash(string) a lot faster
  • Loading branch information
borisbat authored Jul 4, 2023
2 parents 65e6514 + f906d1a commit 22918a4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/builtin/module_builtin_runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ namespace das
}
}

__forceinline bool smart_ptr_is_valid (const smart_ptr_raw<void> dest, Context * context, LineInfoArg * at ) {
__forceinline bool smart_ptr_is_valid (const smart_ptr_raw<void> dest ) {
if (!dest.get()) return true;
ptr_ref_count * t = (ptr_ref_count *) dest.get();
return t->is_valid();
Expand Down Expand Up @@ -1534,6 +1534,9 @@ namespace das
addInterop<_builtin_hash,uint64_t,vec4f>(*this, lib, "hash",
SideEffects::none, "_builtin_hash")
->arg("data");
addExtern<DAS_BIND_FUN(hash64z)>(*this, lib, "hash",
SideEffects::none, "hash64z")
->arg("data");
// locks
addInterop<builtin_verify_locks,void,vec4f>(*this, lib, "_builtin_verify_locks",
SideEffects::modifyArgumentAndExternal, "builtin_verify_locks")
Expand Down Expand Up @@ -1607,7 +1610,7 @@ namespace das
->args({"ptr","context","at"});
addExtern<DAS_BIND_FUN(smart_ptr_is_valid)>(*this, lib, "smart_ptr_is_valid",
SideEffects::none, "smart_ptr_is_valid")
->args({"dest","context","at"});
->arg("dest");
addExtern<DAS_BIND_FUN(equ_sptr_sptr)>(*this, lib, "==", SideEffects::none, "equ_sptr_sptr");
addExtern<DAS_BIND_FUN(nequ_sptr_sptr)>(*this, lib, "!=", SideEffects::none, "nequ_sptr_sptr");
addExtern<DAS_BIND_FUN(equ_ptr_sptr)>(*this, lib, "==", SideEffects::none, "equ_ptr_sptr");
Expand Down

0 comments on commit 22918a4

Please sign in to comment.