[Developers] Double quotes around keyword parameter values

Erik Schnetter schnetter at aei.mpg.de
Fri May 27 14:12:35 CDT 2005


On Friday 27 May 2005 20:46, Jian Tao wrote:
> On Friday 27 May 2005 01:00 pm, Erik Schnetter wrote:
> > This is about keywords, not strings.  I would rather go the other
> > way, namely specifying that keywords must consist of first an
> > alphabetic, and then alphanumeric characters.  This way, keywords
> > are like identifiers in computer languages.
>
> So you mean a parameter like the following will be invalid in the
> future ? ADMBase::lapse_evolution_method = 1+log

I would, of course, keep that for backward compatibility.

Currently, keyword parameters are handled very inefficiently in Cactus.  
Checking a keyword parameter is an operation that takes probably 
thousands or tens of thousands of instructions, which makes it 
impossible to check them inside an inner loop.  (Essentially, comparing 
keyword parameters in Fortran requires calls to malloc and a case 
insensitive string comparison.)

There are several possibilities for making this more efficient.  The 
ones I could think of turn keyword parameters and their allowed values 
into C and Fortran identifiers (or macros or somesuch).  Thus it would 
be necessary to restrict the allowed names to those that are allowed as 
identifiers.

-erik

-- 
Erik Schnetter <schnetter at aei.mpg.de>   http://www.aei.mpg.de/~eschnett/

My email is as private as my paper mail.  I therefore support encrypting
and signing email messages.  Get my PGP key from www.keyserver.net.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.cactuscode.org/pipermail/developers/attachments/20050527/88b75b38/attachment-0002.bin 


More information about the Developers mailing list