Skip to content

Conversation

petermm
Copy link
Contributor

@petermm petermm commented Oct 12, 2025

Adds AArch64/ARM64 architecture detection to the unaligned memory access and byte-swapping macros.

Claude claims:

Erlang Code Pattern Speedup Example Use Case
Binary pattern matching (multi-byte) 5-10x <<A:64/big, B:32/big>> = Data
Network protocol parsing 5-8x TCP/IP, MQTT, HTTP headers
Sensor data reading (I2C/SPI) 3-5x <<Temp:16/big, Pressure:32/big>>
File I/O & serialization 2-5x term_to_binary(), binary files
Binary construction (multi-byte) 3-6x <<Value:64/big, Other:32/big>>
String/binary operations 1.5-3x Binary concatenation
Typical IoT application 15-30% Overall speedup

But something also tells me modern compilers already optimize these..

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

Adds AArch64/ARM64 architecture detection to the unaligned memory access and byte-swapping macros. Signed-off-by: Peter M <petermm@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant