BinaryByter
not really
a kernel shouldn't be optimized?
BinaryByter
no for speed
Well they should optimize more then
Anonymous
a kernel shouldn't be optimized?
depends how often the kernel is used
Anonymous
templeos
Anonymous
look at that code
Anonymous
highly optimized
Anonymous
completely secure
Anonymous
Well they should optimize more then
i do not think you understand how much they optimized it already
Anonymous
macros are faster than c
BinaryByter
okay?
Anonymous
I have used BSD before 😉
have you done benchmarking?
Anonymous
in both?
BinaryByter
yea
BinaryByter
Oh well
Anonymous
what kind of benchmarking?
BinaryByter
also, linux has all sorts of weird issues
Anonymous
libk?
BinaryByter
what kind of benchmarking?
just litterally using it xD
BinaryByter
oh well lets stop the discussion
Anonymous
Anonymous
i will rub my nipples now
BinaryByter
i'll help you
Anonymous
and watch autismo cat
Anonymous
Mat
#ot
Kumar Vipin
Let me repeat my question I am writing a code that take 10 string as input and then arrange them aliphaticly and print them. Here is my code --> https://paste.fedoraproject.org/paste/7sur9pG99BZl4qrZOGlOkQ
Anonymous
for example
Anonymous
abd abcdef or abcdef abd
Anonymous
both are alphabetic
Anonymous
but also are based on length
Kumar Vipin
like all string start with a will come first
Kumar Vipin
like a,b,c,d,e
Anonymous
like a,b,c,d,e
and what if it is different string lengths?
Anonymous
what about spaces?
Anonymous
say someone enters in "hi my"
Kumar Vipin
and what if it is different string lengths?
Like amar,vipin here a come before v so amar is keept above vipin
Kumar Vipin
It's like the attendance register of school
Kumar Vipin
all name starting with A will take on top
Kumar Vipin
then name starting with B then C and so on
Kumar Vipin
Hope you are getting it
Anonymous
A kernel should be 😉
look in linux on lib/gcd.c to see some of their optimizations actually
Anonymous
is aaa in front or behind ab
Anonymous
size mismatching is another way for sorting
Anonymous
you could have it sorted by size first
BinaryByter
how?
Anonymous
how?
their implementation has comments
BinaryByter
its just another algorithm
Anonymous
Anonymous
not the naive one
Anonymous
Wow
i know who ever heard of commenting a kernel
Anonymous
you could have it sorted by size first
than by alphabetical order
Anonymous
what about people who are named McCormick
Anonymous
LeDac
Kumar Vipin
is aaa in front or behind ab
aaa is in front because First word is same and the second word in aaa is a and in ab is b so a is kept above b
Anonymous
the sizes are mismatched
Anonymous
both ways can work
Kumar Vipin
size mismatching is another way for sorting
and if you enter aaa and aa then It's your choice keep any of them on top
Anonymous
but how do you want to deal with this size mismatch
Anonymous
because aaa aa bb bbb
Anonymous
here
Anonymous
because aaa aa bb bbb
this does not have a specific order
Kumar Vipin
because aaa aa bb bbb
comparison of string is done by strcmp function so it keep them in same pattern
Kumar Vipin
like if that function say aaa on top then it keep bbb on top
Kumar Vipin
strcmp will make A B a b
then i will convert all string in upper case.
Anonymous
or just use strcasecmp/stricmp
Anonymous
which is simpler
Anonymous
and more effective
Kumar Vipin
or just use strcasecmp/stricmp
Ya i can use this thanks :)
Kumar Vipin
Ya i can use this thanks :)
But still my logic is not correct I don't know where i am doing it wrong.