mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-08-01 16:28:36 -04:00
23 lines
448 B
Modula-2
23 lines
448 B
Modula-2
|
|
//
|
|
// Built in c# functions like Unsafe.CopyBlockUnaligned benchmark slower
|
|
// than calling into native and using those methods instead. So lets do that.
|
|
//
|
|
|
|
include "tier0/generichash.h"
|
|
|
|
[nogc]
|
|
native static class NativeLowLevel
|
|
{
|
|
inline void Copy( void* dest, void* src, long count )
|
|
{
|
|
V_memcpy( dest, src, (size_t)count );
|
|
}
|
|
|
|
inline ulong MurmurHash64( void* key, int len, uint seed )
|
|
{
|
|
return ::MurmurHash64( key, len, seed );
|
|
}
|
|
}
|
|
|