Skip to content

enc_loop_avx512 round determination is incorrect #155

@nsrussell

Description

@nsrussell

In the snippet below I believe 24 should be 16 so a slight performance degradation in that one less round may be used. If I am wrong and it should be 24, then the initial length guard should be 72 rather than 64.

enc_loop_avx512 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen)
{
	if (*slen < 64) {
		return;
	}

	// Process blocks of 48 bytes at a time. Because blocks are loaded 64
	// bytes at a time, ensure that there will be at least 24 remaining
	// bytes after the last round, so that the final read will not pass
	// beyond the bounds of the input buffer.
	size_t rounds = (*slen - 24) / 48;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions