logo       

newbie question: msg#00299

lang.erlang.general

Subject: newbie question

Hi

I have a question regarding performance!

I have a module (test) with a record test defined .i.e

%%%%%%%%%%%%%%%%%%%%%%%%%%%
-module(test).

-record( test, { field1, field2, field3}).

-export([ compare/2 ]).

-compare( A, B ) when record(A, test), record(B, test)
->
case A#test.field1 > B#test.field1 of
true -> "A>B";
false -> "A/>B"
end.


%%%%%%%%%%%%%%%%%%%%%%%%%%%

The reuse of 'test' as module name and record name helps reduce the number of
atoms used,
but would this have an impact if any on performance when more complex
calculations are done?







NOTE: This e-mail message is subject to the MTN Group disclaimer see
http://www.mtn.co.za/email_disclaimer.asp



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise