[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Relative paths of include files are not normalised, w
From: |
Steffen Nurpmeso |
Subject: |
Re: [Tinycc-devel] Relative paths of include files are not normalised, which can break #pragma once |
Date: |
Fri, 30 Jun 2023 19:41:38 +0200 |
User-agent: |
s-nail v14.9.24-489-gc71d14c5bf |
Detlef Riekenberg wrote in
<trinity-3bcb06b1-9b2f-4bf0-8310-be13f02cdb7e-1688080498166@3c-app-webde\
-bs37>:
...
|I do not think, that we really need a 64bit hash (with 64bit multiply)
|for the complete file content.
|
|In addition to the filename and the filesize, i suggest to use "st_mtime":
| much cheaper and available for free.
How is it with file time resolution over there?
In general i see nanosecond stuff flying by.
I wouldn't really mind .. but other than that i still make heavy
use of Chris Torek's hash (as used by Berkeley DB), even though
i now mix the result as shown by Bret Mulvey.
for(; (c = *buf++) != '\0';)\
xh = (xh << 5) + xh + (unsigned char)c;\
/* Since mixing matters mostly for pow2 spaced maps, mixing the \
* lower 32-bit seems to be sufficient (? in practice) */\
if(xh != 0){\
xh += xh << 13;\
xh ^= xh >> 7;\
xh += xh << 3;\
xh ^= xh >> 17;\
xh += xh << 5;\
}\
Anyway faster than xxhash or siphash or something. Even CRC-32?
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)
- [Tinycc-devel] Relative paths of include files are not normalised, which can break #pragma once, Jonathan Newman, 2023/06/24
- Re: [Tinycc-devel] Relative paths of include files are not normalised, which can break #pragma once, Herman ten Brugge, 2023/06/25
- Re: [Tinycc-devel] Relative paths of include files are not normalised, which can break #pragma once, grischka, 2023/06/27
- Re: [Tinycc-devel] Relative paths of include files are not normalised, which can break #pragma once, Detlef Riekenberg, 2023/06/29
- Re: [Tinycc-devel] Relative paths of include files are not normalised, which can break #pragma once,
Steffen Nurpmeso <=
- Re: [Tinycc-devel] Relative paths of include files are not normalised, which can break #pragma once, grischka, 2023/06/30
- Re: [Tinycc-devel] Relative paths of include files are not normalised, which can break #pragma once, Herman ten Brugge, 2023/06/30