|
Authored by: ThrPilgrim on Thursday, May 10 2012 @ 07:14 PM EDT |
Would this be smiler to the way Perl does constant folding during it's compile
phase.
eg
sub PI { 4 * atan2(1,1) }
sub area_circle {
my $radius = shift;
my $area = PI * $radius * $radius;
return $area;
}
In this case because PI is a sub that takes no parameters and returns a constant
value it can be calculated during the compile phase and the value used to
replace the opcodes for calling the sub in the area_circle sub. So when you call
the area_circle sub in your code the PI sub is never called.
---
Beware of him who would deny you access to information for in his heart he
considers himself your master.[ Reply to This | Parent | # ]
|
|
Authored by: Anonymous on Thursday, May 10 2012 @ 08:36 PM EDT |
I hear
Goofy Gumdrops was a former Sun Engineer writing
many Bajillian Dollar Silly
Patents! [ Reply to This | Parent | # ]
|
|
Authored by: Ian Al on Friday, May 11 2012 @ 06:16 AM EDT |
.
---
Regards
Ian Al
Software Patents: It's the disclosed functions in the patent, stupid![ Reply to This | Parent | # ]
|
|
|
|
|