Hi,
I am sorry but I am not a programmer and I have no
knowledge in C.
I use Perl but every time, people get interest in my
program and want it. I am trying to make it fast.
I am parsing a text file that contains instances and
wires linking these instances.
I have millions of signals and I have some questions
that might sounds stupid to programmes like you.
first point :
I have a hash with millions of keys.
$SIGNALS{$SIGNALNAME}->{INPUTS} = [];
$SIGNALS{$SIGNALNAME}->{OUTPUT} = [];
$SIGNALS{$SIGNALNAME}->{LEVEL} = [];
every time a get a txt portion describing a signal:
I do the following thing :
unless (exists $SIGNALS{$SIGNALNAME}) {
$SIGNALS{$SIGNALNAME}={};
$SIGNALS{$SIGNALNAME}->{isINPUTof}=[];
}
push(@{$SIGNALS{$SIGNALNAME}->{isINPUTof}},$1);
push(@{$SIGNALS{$SIGNALNAME}->{isOUTPUTof}},$2);
...
As I have millions of signals, I am trying to optimize
some things.
the keys are about 50 letters.
is it better to do the following thing ?
$tmp = $SIGNALS{$SIGNALSNAME}
push(@{$tmp->{isINPUTof}},$1);
push(@{$tmp->{isOUTPUTof}},$2);
Would it be faster to replace 'isINPUTof' by 'I' and
isOUTPUTof by 'O' ?
I can't benchmark it because it will take days.
Can somebody help me ?
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran�ais !
Yahoo! Mail : http://fr.mail.yahoo.com
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs