Skip to content

Commit 51f01c6

Browse files
committed
Add comment
1 parent 8603722 commit 51f01c6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mypyc/lib-rt/byteswriter_extra_ops.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ char CPyBytesWriter_Write(PyObject *obj, PyObject *value) {
1818
if (!CPyBytesWriter_EnsureSize(self, size))
1919
return CPY_NONE_ERROR;
2020
if (size < 8) {
21+
// Loop tends to be faster for small sizes
2122
char *p = self->buf + self->len;
2223
for (Py_ssize_t i = 0; i < size; i++) {
2324
p[i] = data[i];

0 commit comments

Comments
 (0)