base64 icon indicating copy to clipboard operation
base64 copied to clipboard

Offer and update info picobase64

Open GermanAizek opened this issue 2 years ago • 8 comments

@gaspardpetit

Hello, I saw that you put my repository in your and would like to announce that I will complete this week and make it more faster under MSVC and Clang. At the moment, I have a very good performance on my server b64encode() function, can you check on your devices? Would like to suggest adding benchmarks for GCC. I can also provide results on my server [email protected]

Repo here: https://github.com/GermanAizek/picobase64

GermanAizek avatar Mar 21 '22 23:03 GermanAizek

Hi @GermanAizek !

I should be able to take a look at this this week and update the benchmarks

gaspardpetit avatar Mar 27 '22 12:03 gaspardpetit

Hi @GermanAizek !

I should be able to take a look at this this week and update the benchmarks

Ok

GermanAizek avatar Mar 27 '22 12:03 GermanAizek

I updated the results, but I find that with vs2019, the encoding is slower than before, and the decoding hasn't changed. Are you able to run the benchmark and compare with my results? I'll run in clang over the weekend to see if I observe the same thing.

gaspardpetit avatar Apr 09 '22 02:04 gaspardpetit

@gaspardpetit, Ok

GermanAizek avatar Apr 09 '22 13:04 GermanAizek

@gaspardpetit, Hi, I rewrote strlen functions. Need to update, I have the following results in MSVC v19.x on Ryzen 5 3600:

*** PROFILING ENCODERS ***

|               Implementation|         32|         64|        128|        256|        512|       1024|       2048|       4096|       8192|      16384|      32768|      65536|
|-----------------------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|
|                      Adition|     1.2458|     0.1145|     0.1415|     0.2075|     0.3400|     0.5935|     1.1028|     2.1198|     4.1636|     8.2991|    16.5039|    32.7792|
|                       Apache|     0.1066|     0.1284|     0.1597|     0.2307|     0.3705|     0.6481|     1.1938|     2.3014|     4.5207|     9.0333|    18.0039|    35.7435|
|              ModpB64Chromium|     0.1117|     0.1332|     0.1608|     0.2261|     0.3583|     0.6056|     1.1020|     2.1012|     4.1037|     8.2408|    16.1859|    32.1601|
|               NibbleAndAHalf|     0.0958|     0.1154|     0.1420|     0.2055|     0.3304|     0.5765|     1.0608|     2.0598|     3.9901|     8.0624|    15.9674|    31.3985|
|                     Turbob64|     0.1430|     0.1532|     0.1507|     0.2299|     0.2385|     0.2696|     0.3282|     0.4450|     0.6808|     1.2355|     2.2142|     4.1076|
|                   picobase64|     0.1689|     0.2065|     0.2609|     0.3668|     0.2524|     0.3396|     0.6274|     0.2214|     0.7326|     0.9401|     0.0431|     0.2655|

*** SORTING ENCODER RESULTS ***

|               Implementation|         32|         64|        128|        256|        512|       1024|       2048|       4096|       8192|      16384|      32768|      65536|
|-----------------------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|
|                   picobase64|     0.1689|     0.2065|     0.2609|     0.3668|     0.2524|     0.3396|     0.6274|     0.2214|     0.7326|     0.9401|     0.0431|     0.2655|
|                     Turbob64|     0.1430|     0.1532|     0.1507|     0.2299|     0.2385|     0.2696|     0.3282|     0.4450|     0.6808|     1.2355|     2.2142|     4.1076|
|               NibbleAndAHalf|     0.0958|     0.1154|     0.1420|     0.2055|     0.3304|     0.5765|     1.0608|     2.0598|     3.9901|     8.0624|    15.9674|    31.3985|
|              ModpB64Chromium|     0.1117|     0.1332|     0.1608|     0.2261|     0.3583|     0.6056|     1.1020|     2.1012|     4.1037|     8.2408|    16.1859|    32.1601|
|                      Adition|     1.2458|     0.1145|     0.1415|     0.2075|     0.3400|     0.5935|     1.1028|     2.1198|     4.1636|     8.2991|    16.5039|    32.7792|
|                       Apache|     0.1066|     0.1284|     0.1597|     0.2307|     0.3705|     0.6481|     1.1938|     2.3014|     4.5207|     9.0333|    18.0039|    35.7435|
Saved encoder report to result/encode-msvc19.js

*** PROFILING DECODERS ***

|               Implementation|         32|         64|        128|        256|        512|       1024|       2048|       4096|       8192|      16384|      32768|      65536|
|-----------------------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|
|                      Adition|     0.0957|     0.1125|     0.1453|     0.2100|     0.3482|     0.6256|     1.1384|     2.1768|     4.2731|     8.5332|    16.9751|    33.7916|
|                       Apache|     0.1322|     0.1829|     0.2841|     0.4580|     0.8003|     1.4908|     2.8598|     5.5988|    11.1051|    22.3048|    44.3431|    88.4473|
|              ModpB64Chromium|     0.0957|     0.1166|     0.1406|     0.1909|     0.2996|     0.5024|     0.8998|     1.7056|     3.3106|     6.6716|    13.3186|    26.5025|
|               NibbleAndAHalf|     0.1023|     0.1201|     0.1480|     0.2093|     0.3318|     0.5762|     1.0476|     2.0083|     3.9489|     7.9205|    15.6626|    31.0614|
|                     Turbob64|     0.0970|     0.1035|     0.1158|     0.1046|     0.1173|     0.1498|     0.2090|     0.3389|     0.5919|     1.2331|     2.2496|     4.2981|
|                   picobase64|     0.1798|     0.2154|     0.2834|     0.4165|     0.6802|     1.2127|     2.2395|     4.2983|     8.4092|    16.8739|    38.2819|    71.9996|

*** SORTING DECODER RESULTS ***

|               Implementation|         32|         64|        128|        256|        512|       1024|       2048|       4096|       8192|      16384|      32768|      65536|
|-----------------------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|
|                     Turbob64|     0.0970|     0.1035|     0.1158|     0.1046|     0.1173|     0.1498|     0.2090|     0.3389|     0.5919|     1.2331|     2.2496|     4.2981|
|              ModpB64Chromium|     0.0957|     0.1166|     0.1406|     0.1909|     0.2996|     0.5024|     0.8998|     1.7056|     3.3106|     6.6716|    13.3186|    26.5025|
|               NibbleAndAHalf|     0.1023|     0.1201|     0.1480|     0.2093|     0.3318|     0.5762|     1.0476|     2.0083|     3.9489|     7.9205|    15.6626|    31.0614|
|                      Adition|     0.0957|     0.1125|     0.1453|     0.2100|     0.3482|     0.6256|     1.1384|     2.1768|     4.2731|     8.5332|    16.9751|    33.7916|
|                   picobase64|     0.1798|     0.2154|     0.2834|     0.4165|     0.6802|     1.2127|     2.2395|     4.2983|     8.4092|    16.8739|    38.2819|    71.9996|
|                       Apache|     0.1322|     0.1829|     0.2841|     0.4580|     0.8003|     1.4908|     2.8598|     5.5988|    11.1051|    22.3048|    44.3431|    88.4473|

GermanAizek avatar Jun 10 '22 09:06 GermanAizek

@gaspardpetit, As you can see, encode leading, but I am sure that on Clang result will deteriorate greatly, since I did not divide code configurations for compilers. I'll check on Clang later.

GermanAizek avatar Jun 10 '22 09:06 GermanAizek

@gaspardpetit, Would you like to do more sample tests for a deeper analysis of base64 algorithm? For example, testing that would record a hardware info computer and send pull request to github to fill out a js script and update Benchmark Results on website?

GermanAizek avatar Jun 14 '22 07:06 GermanAizek

Hi @GermanAizek - I should be able to run the tests again over the weekend and update the tables with your update

gaspardpetit avatar Jun 14 '22 11:06 gaspardpetit