Dima
I’d like flexy
BinaryByter
xD
klimi
Flexy uwu
BinaryByter
string comparisons are slow thoug
BinaryByter
what do you mean?
BinaryByter
in general, string comparisons will always be slower than a simple int comparison
BinaryByter
however, you can already speed it up by using the full capacity of your registers
BinaryByter
instead of checking byte by byte, check word per word or even quad per quad
BinaryByter
okay
BinaryByter
well since string is preimplemented you cannot do that
BinaryByter
or rather: you cannot influence wether they did that
BinaryByter
It won't be enouhg
BinaryByter
Use normal string compares or implement your own std::string ¯\_(ツ)_/¯
BinaryByter
it won't be much better
BinaryByter
since you don't know how strcmp is implemented
BinaryByter
std::string is just a wrapper around char*
BinaryByter
A nice wrapper :)
Silvestr
Is it any difference between static function vs just func in global scope?
BinaryByter
BinaryByter
i know what static funcitons are but what about them do you want to know?
BinaryByter
syntactically they are not at all global functions
BinaryByter
but implementation wise - they pretty much are
Silvestr
#include <string>
static void get() {
std::string str = "wefwef";
...
}
void get() {
std::string str = "wefwef";
...
}
BinaryByter
lol you can make normal global functions static?
Silvestr
static keyword does something for global functions
Silvestr
BinaryByter
Oh right. it means that you cannot use the static funciton outside of the current file
BinaryByter
you should use namespaces instead though
Anonymous
Thank you
Silvestr
Silvestr
I try to explain
BinaryByter
file :
header.h
void somefun();
header.cpp
static void somefun();
main.cpp
#include "header"
int main () {
somefun(); //compiles but doesnt link even if you link against header.o
}
BinaryByter
https://stackoverflow.com/questions/14742664/c-static-local-function-vs-global-function#14742679
Silvestr
If I declare static in somefun() header too?
Francisco
BinaryByter
BinaryByter
Francisco
Also, unnamed namespaces are a good alternative to static functions
BinaryByter
Silvestr
Anonymous
hacker rank
Dima
Dima
What a shame
Anonymous
hacker rank
doesn't accept gets() and puts()?
Anonymous
I have a problem can anyone tell me solution
Anonymous
Hi
Anonymous
I will u
Anonymous
U can review my app
Anonymous
Five star
Nikolas
I love this group.
Nikolas
Little to no C++, but makes me laugh everytime
Anonymous
Please help me
BinaryByter
BinaryByter
Thats why I love my task as an admin here
Anonymous
If you do not help then you will get my app suspension
BinaryByter
U can review my app
/warn stop being so off-topic, smelly feets would be more ontopic
Anonymous
U can review my app
Nikolas
U can review my app
you know, begging for review is not a good idea. 50% of the times you will get kicked, the other 50% people will ask for the link and then review 1 star
Nikolas
you gotta learn how to survive on the internet man
Anonymous
😔Ok
Anonymous
Sorry for disturb
Daniele°
Anonymous
Dima
Dima
or a drama… who knows
Dima
is there any alternative for critical section that spins in *nix? like winapi’s InitializeCriticalSectionAndSpinCount
Ludovic 'Archivist'
Ludovic 'Archivist'
Ludovic 'Archivist'
Should be basically this
Dima
oh, this. i’ll take a look now, thanks
Ludovic 'Archivist'
Anonymous
Any one need Products through amazon or flipkart products at very cheap rate (Orginal)then inbox me
Anonymous
/hi
Nikolas
Dima
BinaryByter
Dima
Nikolas
/wan
was that a middle way between warn and ban?
Dima