Skip to content

Commit

Permalink
Merge pull request #3104 from smehringer/io_performance
Browse files Browse the repository at this point in the history
[FEATURE] Minor increase in FASTA performance.
  • Loading branch information
smehringer authored Nov 28, 2022
2 parents 89932c0 + b1709f3 commit 1ac7b8a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions include/seqan3/io/sequence_file/format_fasta.hpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -309,16 +309,21 @@ class format_fasta

for (; (it != e) && ((!is_id)(*it)); ++it)
{
if ((is_space || is_digit)(*it))
if (is_legal_alph(*it))
{
seq.push_back(assign_char_to(*it, std::ranges::range_value_t<seq_type>{}));
}
else if ((is_space || is_digit)(*it))
{
continue;
else if (!is_legal_alph(*it))
}
else
{

throw parse_error{std::string{"Encountered an unexpected letter: "} + "char_is_valid_for<"
+ detail::type_name_as_string<seq_legal_alph_type>
+ "> evaluated to false on " + detail::make_printable(*it)};
}

seq.push_back(assign_char_to(*it, std::ranges::range_value_t<seq_type>{}));
}

#else // ↑↑↑ WORKAROUND | ORIGINAL ↓↓↓
Expand Down

1 comment on commit 1ac7b8a

@vercel
Copy link

@vercel vercel bot commented on 1ac7b8a Nov 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

seqan3 – ./

seqan3-git-master-seqan.vercel.app
seqan3.vercel.app
seqan3-seqan.vercel.app

Please sign in to comment.