Skip to content

Optimization for function Bio::PrimarySeqI::_find_orfs_nucleotide() #406

Description

@kprokopiou

Within the body of function Bio::PrimarySeqI::_find_orfs_nucleotide() there is the following loop:

for( my $j = 0; $j <= $seqlen-3; $j++ ) {
my $frame = $j % 3;

my $this_codon = substr( $sequence, $j, 3 );

...
}
The creation of $frame and $this_codon variables, especially for a large sequence is not optimal.
I propose the following optimization:

my ($frame, $this_codon);
for( my $j = 0; $j <= $seqlen-3; $j++ ) {
$frame = $j % 3;

$this_codon = substr( $sequence, $j, 3 );

...
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions