Skip to content

Conversation

willstott101
Copy link

Purpose of This Pull Request

Please check the relevant option by placing an "X" inside the brackets:

  • Documentation update
  • Bug fix
  • New feature
  • Other (please explain):

Overview of Changes

Most of the files I am exporting from GIMP 3.0.4 were failing to load due to these properties being out of range or unexpected.

list is a generic container with indirection for every element's type.
This makes it slower than a bytearray for basically any operation.

>>> timeit("a.extend(a[1:2] * 6024)", "a = bytearray(b'123' * 1024)", globals=globals())
7.540333299897611
>>> timeit("a.extend([a[1]] * 6024)", "a = bytearray(b'123' * 1024)", globals=globals())
35.999150899937376
@willstott101
Copy link
Author

Added a small RLE optimization here too, LMK if you'd rather have small PRs. Either way I'll try and keep the commits clear.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant