[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

>> std::sort is fully generic over all containers with

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 10
Thread images: 1

File: c++logo.jpg (4KB, 118x118px) Image search: [Google]
c++logo.jpg
4KB, 118x118px
>> std::sort is fully generic over all containers with guarenteed O(nlog(n)) time complexity.
>> Sorts linked lists in O(n^2log(n) time) because it expects a random access iterator.

Why is the STL so utterly terrible? It's not actually generic by any means, but at the same time it cripples itself on so many points by not including functions that aren't "generic", yet none of the functions in that library even come close to being as generic as your typical Haskell function. Often you end up having to reimplement basic functionality, because the STL's standard function to do this is utterly retarded and unsafe.

Most of the STL "generic" functions actually only work well on a single special case, and are either unsafe or perform poorly on everything else, and the "genericness" of the function is a red herring. Or they fail spectacularily for Vector<Bool>.
>>
>>61638816
i have seen people use text processing tools to duplicate functions for each type instead of using STL, what a bullshit.
>>
>>61638943
Not really, if you care about compile times.
>>
>>61638816
>using linked lists
>using linked lists in generic sort algorithms
OP I'm not sure what you expected.
>>
>>61638986
>cares about compilation time
>uses C++
hmmm
>>
>>61639879
>cares about performance and compilation time
If you're writing some high performance software (Wwise or fmod for example) your coworkers need to compile it as fast as possible. You can surely do it better in JavaScript.
>>
I can't tell when /g/ is trolling or legitimately retarded anymore.
>>
>>61638816

why the fuck would anyone use linked lists?
>>
>>61641610
Because you can expand them, and also they're faster to traverse than arrays on some systems.
>>
>>61638816
>using linked lists
first semester cs babby discovered
Thread posts: 10
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.