[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]

send help.

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: 18
Thread images: 3

File: NO NO NO NO NO.png (75KB, 577x583px) Image search: [Google]
NO NO NO NO NO.png
75KB, 577x583px
send help.
>>
>using loopcounter to iterate through an array
nigga that's why the letter i was invented
>>
>>61726244
arrays should only be referenced using numbered indexes. Unless you want to have many headache
>>
>>61726225
>academics
> web developers

two sides of the same coin, really
>>
>not scoping your loop counter
how terrifying
>>
>>61726225
>centigrade
is this American for Celsius?
>>
>>61726272
have you read K&R?
>>
>>61727087
Centigrade = degrees Celsius

Centi = 100, grade = scale
>>
>>61727553
yea?
But Fahrenheit doesn't break down to idiot scale, but rather stems from the guy who made it.

Why not just call it Celsius and Fahrenheit?
>>
File: death to all cia niggers.png (351KB, 500x335px) Image search: [Google]
death to all cia niggers.png
351KB, 500x335px
>>61726896
Terry-fying*
>>
>>61726225
The biggest problem with this is that if you change the size of your arrays you need to then change the number of times your loops iterate.

It is a terrible coding foundation. Like, literally don't even do this. Ever. It's not faster than using some iterator which will go through an array of N length and it is just not useful. All that will happen is you will use it when you shouldn't and get bad output.
>>
>>61727763
Reminder if loop iteration size isn't known at compile time your compiler will not unwrap your loop for optimal performance
>>
>>61727784
Still better than having it spit out incorrect data or an exception because you're trying to iterate an array that isn't large enough or not iterate it enough.
>>
File: ugh.jpg (31KB, 460x460px) Image search: [Google]
ugh.jpg
31KB, 460x460px
>>61726896
>he doesn't know var is function scoped
>>
>>61727784
>unwrap your loop
You forgot that cache is a thing, and keeping your code small is more beneficial.

Also, this is cold code where you'll shave off every CPU cycle you can.
>>
>>61730501
Even in a for condition? Fucking hell.
>>
>>61730634
You're right, that's why inlining is always slower than branching.
>>
> document.write
Thread posts: 18
Thread images: 3


[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.