From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Daniel Berlin Cc: gdb-patches@sources.redhat.com, Jim Blandy Subject: Re: PATCH: fail to improve psymtab memory consumption Date: Tue, 24 Jul 2001 07:49:00 -0000 Message-id: <3B5D85C3.1000104@cygnus.com> References: <20010720212013.7DA695E9D8@zwingli.cygnus.com> <87lmljdz4g.fsf@cgsoftware.com> <87d76uerh8.fsf@cgsoftware.com> <3B5CD3B6.9060106@cygnus.com> <87zo9uaow2.fsf@cgsoftware.com> X-SW-Source: 2001-07/msg00594.html >> Does this require serial or random file i/o? > > ... you could make fread use mmap > in special cases, but they don't happen enough in practice to make > fread fast enough to beat mmap. It may not happen enough to ``beat mmap'', it certainly happens enough to justify the implementation of FILE using V/M based schema. Anyway, that isn't the objective. The objective is to get the dwarf2 reader clean simple and pragmatically fast. Fast, at all cost, is like micro-optomizing using STREQ() macros. If you think there should be a mmap implementation then abstract it out so that dwarf2 uses it rather than contains it. If you think there should be MMAP, then get it added to BFD where all readers will benefit, not just DWARF2. Andrew