newbie question

Primanathan Reddy [ MTN - Innovation Centre ] <>
Wed Jan 28 15:57:25 CET 2004


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



More information about the erlang-questions mailing list