Anonymous
oh, really?
Anonymous
so im making something basic
Ludovic 'Archivist'
an alternative - but again: a slow one
Slow? No, compile time dude, that ain't slow
Ludovic 'Archivist'
a compile time hashmap?
Constexpr everything
Ludovic 'Archivist'
Not using a hashmap but proper constant expressions
BinaryByter
Constexpr everything
lets ask godbolt wether your hashmap is actually compile time
BinaryByter
but if it uses arrays you already lost
Ludovic 'Archivist'
Hashmap is slower, but constexpr everything is not more complex
BinaryByter
lol
Anonymous
constexpr functions will be evaluated at compile time if all arguments are constant exps and the result is used in a constant exp too?
Ludovic 'Archivist'
but if it uses arrays you already lost
Actually, you can make a constexpr hashmap, its size is however fixed
BinaryByter
Ибраги́м
Yeah, and if you can find a structure that can map a quotation symbol to a structure in less than a nanosecond, you have broken some laws of physics
Yea, after reading all Intel *lakes specs and AMD Zen goodies, then moving on GCC and Clang docs looking shortest path to glory.
BinaryByter
Actually, you can make a constexpr hashmap, its size is however fixed
yesn't. It requires all the inputs to be constexpr. which... makes it useless
Ludovic 'Archivist'
why tell me to use a hasmap then? 🤔
I told you you CAN, and I also told you you SHOULD use constexpr everything
Raul
Dang, I didn't mean to start a fight in here lol
Anonymous
unordered maps increase speed
Raul
unordered maps increase speed
depends on how you use them
BinaryByter
Ludovic 'Archivist'
BinaryByter
BinaryByter
For webcpp it should
except you cant constexpr std::string
Ludovic 'Archivist'
except you cant constexpr std::string
Which is why I also already answered that argument
BinaryByter
what should I use instead?
Mihail
BinaryByter
std::string_view exists
i don't remember it being constexpr correct tho
Ludovic 'Archivist'
what should I use instead?
constexpr generators
Jussi
Fuck I hate asynchronous everything, especially boost::asio
BinaryByter
constexpr generators
useless if they return std::string lol
Jussi
Just saying, thanks for listening
Ludovic 'Archivist'
useless if they return std::string lol
You generate a stream of characters
Dima
boost is a meme
I mostly disagree with you but this one yeah
Ludovic 'Archivist'
Not anything else
Ludovic 'Archivist'
You generate a stream of characters
And that is very well optimized
Anonymous
not really
Anonymous
std:string doesnt always require deep copies either
Anonymous
so
Anonymous
lolz
Ludovic 'Archivist'
std:string doesnt always require deep copies either
A generator never does so, and is also a very fairly simple structure
Anonymous
doesnt constexpr prevent use of intrinsics though?
Anonymous
like simd?
Anonymous
so runtime suffers anyway?
BinaryByter
constexpr is compile time tho lol
Dima
simd constexprs o.O
Anonymous
intrinsics arent constexpr, you cant write intrinsics strlen or memcpy which uses SSE instructions for isntance?
Anonymous
y this is dude writing return 0; in int main?
Anonymous
doesnt it do it implcitly
BinaryByter
BinaryByter
@mmihov how is your constexpr correct string_view gonna help me with that?
Anonymous
forgot the length maxi?
BinaryByter
no
BinaryByter
but there is no concatenation of strings
BinaryByter
unless I use std::strcpy
BinaryByter
which makes compile time strings useless kek
olli
obviously no concat, since it's only a view
BinaryByter
it won't
THEN WHY DO YOU TELL ME TO USE IT?
BinaryByter
does someone want to prove me wrong at all cost?
Ludovic 'Archivist'
doesnt constexpr prevent use of intrinsics though?
Which you don't need to write yourself anyway for a templating engine that generates the most bloated visual representation format ever invented
Anonymous
oh you were talking about making things fast?
Mihail
THEN WHY DO YOU TELL ME TO USE IT?
you were talking about constexpt std::string. and std::string_view is a constexpr view into a string, so i suggested it. do you magically expect me to know the details of your use case?
Ludovic 'Archivist'
unless I use std::strcpy
Or std::copy, or a function you define
BinaryByter
Or std::copy, or a function you define
Sure but it makes the whole constexpr point wrong
Anonymous
isn't the whole point of string_view to avoid string copying?
Anonymous
lmao?