tinycc-devel
[Top][All Lists]
Advanced

[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: Detlef Riekenberg
Subject: Re: [Tinycc-devel] Relative paths of include files are not normalised, which can break #pragma once
Date: Fri, 30 Jun 2023 01:14:58 +0200

Hi Herman

> > On 25.06.2023 20:30, Herman ten Brugge via Tinycc-devel wrote:
> >>
> >> I just pushed a patch to fix this.
> >
> > Hi Hermann,
> >
> > some numbers from Win32:
> >
> > before:
> >   # 6.334 s, 85768 lines/s, 27.9 MB/s
> > after first patch:
> >   # 11.825 s, 45941 lines/s, 14.9 MB/s
> > after second patch:
> >   # 10.406 s, 52206 lines/s, 17.0 MB/s
> >
> > Hm ...

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.


> I tested this also before committing. I could not find a problem.
> I only have an x86_64 machine on redhat linux and a raspberry pi with 32 
> and 64 bits.
> I also have no Windows any more and my i386 machine died about 10 years ago.

> So I did the measurement with wine (32/64 bits) and saw no difference 
> before and after commit.

Your machine is too recent / too fast / has too much memory.
* Multiplications on recent processors are much faster than on older processors.
* A SSD is so fast, that loading many includes many times has no resonable 
delay.
* With a huge amount of system memory, your include directory entries and many 
include files are cached.

For speed tests comparsion, a low resource VM or an old system with fewer RAM 
and a HDD will show the slowdown.
(disable kernel VM support / force JIT mode to make the emulated processor 
slower)

> I cannot currently think of a better solution for pragma once. Maybe you 
> can?

* replace the hash with "st_mtime"


-- 
Regards ... Detlef






reply via email to

[Prev in Thread] Current Thread [Next in Thread]