# Parse / Pattern match large binary data

**URL:** <https://forum.elixirforum.com/t/parse-pattern-match-large-binary-data/24816>\
**Category:** Questions\
**Tags:** parsing, large-binary\
**Created:** [August 21, 2019, 9:58am UTC](https://forum.elixirforum.com/t/parse-pattern-match-large-binary-data/24816 "2019-08-21T09:58:05Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![benwilson512](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/benwilson512/32/1457_2.png) [@benwilson512](https://forum.elixirforum.com/u/benwilson512)\
**Post date:** [August 21, 2019, 3:38pm UTC](https://forum.elixirforum.com/t/parse-pattern-match-large-binary-data/24816/12 "2019-08-21T15:38:07Z")

</div>

@CharlesO At a minimum if you are going to parse it all in memory, you need to never append to a list in a loop. This is an O(n^2) operation. You should prepend to the list, and then reverse at the end. Or, use a body recursive function that builds the list front to back via recursion.

---

_[View the full topic](https://forum.elixirforum.com/t/parse-pattern-match-large-binary-data/24816)._
