golang/go

crypto/cipher: optimize safeXORBytes

オープン

#35,381 opened on 2019/11/05

 (11 件のコメント) (0 件のリアクション) (0 人の担当者)Go (19,008 件のフォーク)batch import
NeedsInvestigationPerformanceSuggestedhelp wanted

Repository metrics

Stars
 (133,883 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

The discussion at https://github.com/golang/go/issues/31586 includes several techniques for optimizing xor of byte slices, including using encoding/binary (with native endianness) and loop unrolling. It'd be nice to apply them to safeXORBytes, which is used on many non-amd64 platforms. An optimized safeXORBytes might even be fast enough that we could delete fastXORBytes.

Somewhat related: #30553

cc @nhooyr

コントリビューターガイド