Web++: A C++ Web Framework
132 subscribers
440 photos
36 videos
20 files
177 links
Web++ Framework (A C++ web framework to ease the pain of web development)

Using modern C++20/23.
GitHub: https://github.com/the-moisrex/webpp

I've been working on this project since 2019...
Download Telegram
Amazing performance stuff with SIMD
Okay did I just beat boost::iequals algorithm with 10086x performance? SIMD is amazing stuff; you should try it at home :)
I've added some of the benchmarks I've used for this project to the git repository, unfortunately I'm not able to gather all the benchmarks I've used so far, and even some of them don't have anything to do with this project directly (for example I've did lots of benchmarking for std::variant and others).
I'll try to put all of future benchmarks in the repository as well (in the benchmarks directory).

Feel free to run them, add to them, updated them and learn from them as I did a lot so far.

Specially the iequals and tolower benchmarks which I did this week were amazing stuff.

Even with iequals, I madethe algorithm to run about 2000x faster.

You can find the benchmarks in dev branch in the benchmarks directory: https://github.com/the-moisrex/webpp/tree/dev/benchmarks
My curiosity got the best me; so I implemented a SIMD-enabled string equality function just to find out ... (find out about the results here:)
https://github.com/the-moisrex/webpp/tree/dev/benchmarks/equals
It's a messed up code if you have to write comments for each line; and also to avoid "clang-format" to mess them up :)
It's C++, what did you expect? :)
Had a nice talk with Sean Baxter about attributes; remind me to use them in this framework when we can use them in our C++ projects in a couple of years.

https://twitter.com/the_moisrex/status/1313878622428594176
Can you believe this checks if two strings are equal or not case-insensitively?

There's actually one more optimization I could do (which is written in shape of a todo comment).
Don't waste clock cycles.
Web++: A C++ Web Framework
Don't waste clock cycles.
Implemented Accept-Encoding HTTP header parser. Implementing simple things can really get tricky sometimes.

Source is here:
https://github.com/the-moisrex/webpp/blob/dev/core/include/webpp/http/headers/accept_encoding.hpp
Now I gotta learn ZLib for gzip;
What do library you recommend for "br", "compress", and "deflate"? Is there one that supports all of them?

https://zlib.net/zlib_how.html
This whole shenanigan is to make fmt library as a fallback for not-yet-implemented std::format.
Can't we just have a "stl_fallback.h" header?
Oh look, my reply to Heb Sutter's tweet is in his talk.
https://youtu.be/6lurOCdaj0Y