Commit e6e6158e authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

Slight speed increase from not creating new anonymous arrays.

parent da0d1d94
......@@ -14,8 +14,7 @@ use base( 'Bio::EnsEMBL::Collection',
sub _create_feature {
my ( $this, $feature_type, $args ) = @_;
my @feature =
@{ $this->SUPER::_create_feature( $feature_type, $args ) };
my $feature = $this->SUPER::_create_feature( $feature_type, $args );
my ( $hstart, $hend, $score, $repeat_consensus, $analysis ) =
rearrange( [ 'HSTART', 'HEND',
......@@ -24,25 +23,25 @@ sub _create_feature {
],
@{$args} );
push( @feature,
push( @{$feature},
$hstart, $hend, $score, $repeat_consensus->dbID(),
$analysis->dbID() );
return \@feature;
return $feature;
}
sub _create_feature_fast {
my ( $this, $feature_type, $args ) = @_;
my @feature =
@{ $this->SUPER::_create_feature_fast( $feature_type, $args ) };
my $feature =
$this->SUPER::_create_feature_fast( $feature_type, $args );
push( @feature,
push( @{$feature},
$args->{'hstart'}, $args->{'hend'}, $args->{'score'},
$args->{'repeat_consensus'}->dbID(),
$args->{'analysis'}->dbID() );
return \@feature;
return $feature;
}
1;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment