Skip to content

Instantly share code, notes, and snippets.

@kassane
Last active January 16, 2023 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kassane/c13d7872b51f4c45f5bc28396c274846 to your computer and use it in GitHub Desktop.
Save kassane/c13d7872b51f4c45f5bc28396c274846 to your computer and use it in GitHub Desktop.
throughput_test [ zig | seed = 10 ]: AllWinner D1 (Sipeed) - Debian 11 | src: https://github.com/ziglang/zig/blob/master/lib/std/crypto/benchmark.zig
nezha
description: Computer
product: Allwinner D1 Nezha
width: 64 bits
*-core
description: Motherboard
physical id: 0
*-cpu
description: CPU
product: cpu
physical id: 0
bus info: cpu@0
size: 1008MHz
capacity: 1008MHz
width: 32 bits
capabilities: cpufreq
*-cache
description: L1 Cache
physical id: 0
size: 32KiB
*-memory
description: System memory
physical id: 1
size: 986MiB
*-usbhost:0
product: EHCI Host Controller
vendor: Linux 5.18.0-rc4-gf4bce410a6b4-dirty ehci_hcd
physical id: 2
bus info: usb@1
logical name: usb1
version: 5.18
capabilities: usb-2.00
configuration: driver=hub slots=1 speed=480Mbit/s
*-usbhost:1
product: EHCI Host Controller
vendor: Linux 5.18.0-rc4-gf4bce410a6b4-dirty ehci_hcd
physical id: 3
bus info: usb@2
logical name: usb2
version: 5.18
capabilities: usb-2.00
configuration: driver=hub slots=1 speed=480Mbit/s
*-usbhost:2
product: Generic Platform OHCI controller
vendor: Linux 5.18.0-rc4-gf4bce410a6b4-dirty ohci_hcd
physical id: 4
bus info: usb@3
logical name: usb3
version: 5.18
capabilities: usb-1.10
configuration: driver=hub slots=1 speed=12Mbit/s
*-usbhost:3
product: Generic Platform OHCI controller
vendor: Linux 5.18.0-rc4-gf4bce410a6b4-dirty ohci_hcd
physical id: 5
bus info: usb@4
logical name: usb4
version: 5.18
capabilities: usb-1.10
configuration: driver=hub slots=1 speed=12Mbit/s
*-usbhost:4
product: MUSB HDRC host driver
vendor: Linux 5.18.0-rc4-gf4bce410a6b4-dirty musb-hcd
physical id: 1
bus info: usb@5
logical name: usb5
version: 5.18
capabilities: usb-2.00
configuration: driver=hub slots=1 speed=480Mbit/s
*-mmc0
description: MMC Host
physical id: 6
logical name: mmc0
*-device
description: SD Card
product: SA32G
vendor: Kingston
physical id: 1234
logical name: /dev/mmcblk0
version: 7.1
date: 11/2021
serial: 720361601
size: 29GiB (31GB)
capabilities: sd gpt-1.00 partitioned partitioned:gpt
configuration: guid=b0d6e59f-df8b-4f75-a7b4-ebd8a762413d logicalsectorsize=512 sectorsize=512
*-volume:0
description: EFI partition
vendor: Linux
physical id: 1
logical name: /dev/mmcblk0p1
logical name: /boot
version: 1.0
serial: 45f3f495-b1d0-47c1-90c3-de9ad19c565d
size: 460MiB
capabilities: extended_attributes large_files ext2 initialized
configuration: filesystem=ext2 label=boot lastmountpoint=/boot modified=2022-06-18 15:22:48 mount.fstype=ext2 mount.options=rw,noatime mounted=2022-06-18 15:22:48 name=primary state=mounted
*-volume:1
description: EXT4 volume
vendor: Linux
physical id: 2
logical name: /dev/mmcblk0p2
version: 1.0
serial: 0d75c470-9841-4449-96f8-aa6e03792613
size: 28GiB
capabilities: journaled extended_attributes large_files huge_files dir_nlink recover 64bit extents ext4 ext2 initialized
configuration: created=2022-05-30 17:01:35 filesystem=ext4 label=root lastmountpoint=/ modified=2022-05-30 17:32:51 mounted=2022-06-18 15:22:42 name=primary state=clean
*-mmc1
description: MMC Host
physical id: 7
logical name: mmc1
*-device
description: SDIO Device
physical id: 1
bus info: mmc@1:0001:1
logical name: mmc1:0001:1
serial: 0
capabilities: sdio
*-network:0
description: Ethernet interface
physical id: 8
logical name: eth0
serial: 1e:d9:29:86:ae:d5
size: 100Mbit/s
capacity: 1Gbit/s
capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=st_mac100 driverversion=5.18.0-rc4-gf4bce410a6b4-dirty duplex=full ip=192.168.1.129 link=yes multicast=yes port=twisted pair speed=100Mbit/s
*-network:1 DISABLED
description: Ethernet interface
physical id: 9
logical name: usb0
serial: ba:45:96:a1:ef:2f
capabilities: ethernet physical
configuration: broadcast=yes driver=g_ether driverversion=29-May-2008 firmware=musb-hdrc link=no multicast=yes
time ./bench_acclhw_crypto
md5: 32 MiB/s
sha1: 23 MiB/s
sha256: 12 MiB/s
sha512: 17 MiB/s
sha3-256: 14 MiB/s
sha3-512: 8 MiB/s
gimli-hash: 7 MiB/s
blake2s: 22 MiB/s
blake2b: 32 MiB/s
blake3: 21 MiB/s
ghash: 14 MiB/s
poly1305: 77 MiB/s
hmac-md5: 51 MiB/s
hmac-sha1: 33 MiB/s
hmac-sha256: 13 MiB/s
hmac-sha512: 19 MiB/s
siphash-2-4: 93 MiB/s
siphash-1-3: 138 MiB/s
siphash128-2-4: 93 MiB/s
siphash128-1-3: 138 MiB/s
x25519: 797 exchanges/s
ed25519: 604 signatures/s
ed25519: 511 verifications/s
ed25519: 1088 verifications/s (batch)
chacha20Poly1305: 16 MiB/s
xchacha20Poly1305: 16 MiB/s
xchacha8Poly1305: 22 MiB/s
xsalsa20Poly1305: 16 MiB/s
gimli-aead: 7 MiB/s
aegis-128l: 24 MiB/s
aegis-256: 18 MiB/s
aes128-gcm: 6 MiB/s
aes256-gcm: 5 MiB/s
aes128-ocb: 10 MiB/s
aes256-ocb: 8 MiB/s
isapa128a: 5 MiB/s
aes128-single: 996624 ops/s
aes256-single: 745501 ops/s
aes128-8: 999012 ops/s
aes256-8: 746328 ops/s
bcrypt: 1.702 s/ops
scrypt: 0.669 s/ops
argon2: 2.337 s/ops
time:
1170.18s user
24.48s system
99% cpu
20:06.04 total
@kassane
Copy link
Author

kassane commented Jul 12, 2022

Build command: zig build-exe -target riscv64-linux-musl -mcpu=baseline_rv64+experimental_v -O ReleaseFast benchmark.zig

More info about riscv targets: lupyuen/zig-bl602-nuttx#1

Change: LLVM13 [ -mcpu=baseline_rv64+experimental_v] to LLVM 14 [-mcpu=baseline_rv64+v]

Godbolt: (zig master - LLVM 14)
https://zig.godbolt.org/z/Kj5v9Gqaa

@kassane
Copy link
Author

kassane commented Jan 16, 2023

Nezha Ubuntu 22.04.1

[  105.745471] cloud-init[587]: ci-info: +--------+-------+----------------------------------------+---------------+--------+-------------------+
[  105.747996] cloud-init[587]: ci-info: ++++++++++++++++++++++++++++++Route IPv4 info++++++++++++++++++++++++++++++
[  105.754025] cloud-init[587]: ci-info: +-------+-------------+-------------+-----------------+-----------+-------+
[  105.757461] cloud-init[587]: ci-info: | Route | Destination |   Gateway   |     Genmask     | Interface | Flags |
[  105.761432] cloud-init[587]: ci-info: +-------+-------------+-------------+-----------------+-----------+-------+
[  105.765218] cloud-init[587]: ci-info: |   0   |   0.0.0.0   | 192.168.1.1 |     0.0.0.0     |    eth0   |   UG  |
[  105.769361] cloud-init[587]: ci-info: |   1   | 192.168.1.0 |   0.0.0.0   |  255.255.255.0  |    eth0   |   U   |
[  105.773386] cloud-init[587]: ci-info: |   2   | 192.168.1.1 |   0.0.0.0   | 255.255.255.255 |    eth0   |   UH  |
[  105.777379] cloud-init[587]: ci-info: +-------+-------------+-------------+-----------------+-----------+-------+
[  105.781512] cloud-init[587]: ci-info: +++++++++++++++++++++++++++++++Route IPv6 info++++++++++++++++++++++++++++++++
[  105.785360] cloud-init[587]: ci-info: +-------+--------------------+---------------------------+-----------+-------+
[  105.789394] cloud-init[587]: ci-info: | Route |    Destination     |          Gateway          | Interface | Flags |
[  105.793362] cloud-init[587]: ci-info: +-------+--------------------+---------------------------+-----------+-------+
[  105.797250] cloud-init[587]: ci-info: |   1   | fdfc:e618:714::/64 |             ::            |    eth0   |   U   |
[  105.801448] cloud-init[587]: ci-info: |   2   | fdfc:e618:714::/48 | fe80::c671:54ff:fee3:12f0 |    eth0   |  UGe  |
[  105.805415] cloud-init[587]: ci-info: |   3   |     fe80::/64      |             ::            |    eth0   |   U   |
[  105.809392] cloud-init[587]: ci-info: |   5   |       local        |             ::            |    eth0   |   U   |
[  105.811886] cloud-init[587]: ci-info: |   6   |       local        |             ::            |    eth0   |   U   |
[  105.821918] cloud-init[587]: ci-info: |   7   |       local        |             ::            |    eth0   |   U   |
[  105.823653] cloud-init[587]: ci-info: |   8   |     multicast      |             ::            |    eth0   |   U   |
[  105.825759] cloud-init[587]: ci-info: +-------+--------------------+---------------------------+-----------+-------+

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