the-moisrex / webpp

C++ web framework | web development can be done with C++ as well.
https://t.me/webpp
MIT License
129 stars 9 forks source link

Benchmark against Ada #437

Open the-moisrex opened 11 months ago

the-moisrex commented 11 months ago

Everyone's talking about Ada. Let's benchmark my own implemention of URI parser and generator and IPv4 and v6 parser and serializers against Ada's.

the-moisrex commented 11 months ago

We're losing! :sob:

2023-10-07T10:09:33-08:00
Running ./a.out
Run on (8 X 3301.2 MHz CPU s)
CPU Caches:
  L1 Data 32 KiB (x4)
  L1 Instruction 32 KiB (x4)
  L2 Unified 256 KiB (x4)
  L3 Unified 6144 KiB (x1)
Load Average: 1.27, 1.13, 1.46
------------------------------------------------------------------------
Benchmark                              Time             CPU   Iterations
------------------------------------------------------------------------
WebppSchemePort                     9.45 ns         9.45 ns     73236889
AdaSchemePort                       12.6 ns         12.6 ns     55849600
WebppV1SerializeIPv4                30.8 ns         30.8 ns     22750807
WebppV1OptimizedSerializeIPv4       22.0 ns         22.0 ns     31794079
WebppV2OptimizedSerializeIPv4       21.9 ns         21.9 ns     32114162
WebppSerializeIPv4                  31.1 ns         31.1 ns     22445001
AdaSerializeIPv4                    22.4 ns         22.4 ns     31388955
AdaSerializeIPv6                    44.7 ns         44.6 ns     15783639
WebppSerializeIPv6                  58.5 ns         58.5 ns     11833784
WebppV1SerializeIPv6Optimized       59.7 ns         59.6 ns     11853974
the-moisrex commented 11 months ago

I'm winning in Ipv4 now, but not Ipv6