[erlang-questions] The is_record() guard

Steve Davis steven.charles.davis@REDACTED
Thu Jul 23 20:02:24 CEST 2009


Hi Oscar,

Oscar Hellström wrote:
> You could also do it this way:
> 
> transform(#rec_a{} = R) -> ... ;
> transform(#rec_b{} = R) -> ... ;
> ...

Ah yes. Hmmm... looks like I have bought myself two possible refactors 
to try/test now ;(

> Not that it mattered in the end though but useless
> optimizations are very common...
> 

Yep, I have tried to write the code "correct" first - it was the fprof 
result that made me look at this - this match function is necessarily 
called at every invocation and is by far and away the slowest part of 
the code.

Best regards,
Steve


More information about the erlang-questions mailing list