texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] Efficiency of C++ switch-statements


From: Bob McElrath
Subject: Re: [Texmacs-dev] Efficiency of C++ switch-statements
Date: Wed, 12 Nov 2003 12:10:44 -0800
User-agent: Mutt/1.5.4i

David Allouche address@hidden wrote:
> On Tue, Nov 11, 2003 at 04:06:28PM +0100, Gabriel Dos Reis wrote:
> > I assume those tags actually identify Texmacs entities.  No?
> 
> Absolutely right. Actually, I have been thinking that all this explicit
> dispatch on tree labels is quite ugly.

This is why I was thinking of a hash_map.  I assume these are like XML
tag names?  Then you're doing a string compare somewhere anyway, and a
hash_map is more efficent than string compares (and even a binary search
using string compares) followed by a case.

Cheers,
Bob McElrath [Univ. of California at Davis, Department of Physics]

Attachment: signature.asc
Description: Digital signature


reply via email to

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