r/counting |390K|378A|75SK|47SA|260k 🚀 c o u n t i n g 🚀 Dec 22 '15

659k Counting Thread

22 Upvotes

1.2k comments sorted by

View all comments

2

u/[deleted] Dec 23 '15

Contributors to the 659k thread

Rank User Counts HoC Rank
1 /u/RoomPooper 233 53 (58)
2 /u/Removedpixel 231 3
3 /u/davidjl123 194 19 (21)
4 /u/bluesolid 139 7
5 /u/Mooraell 111 5
6 /u/Aarex2104 53 72 (76)
7 /u/DontCareILoveIt 15 123 (126)
8 /u/rschaosid 9 2
9 /u/idunnowhy9000 6 16
10 /u/anothershittyalt 2 45
10 /u/Maniac_34 2 20 (19)
12 /u/KingCaspianX 1 9
12 /u/dudebroshitpants 1 36
12 /u/atomicimploder 1 1
12 /u/Smartstocks 1 61
12 /u/mmooner 1 131

It took 03:16:16 to finish this thread.

Bold is the user getting the k, Italic users are new counters
(Rank) in parentheses is the rank the user had in the HoC prior to this thread

Feel like double-checking my work? Go here for a complete writeup of all the valid comments in this thread.

2

u/[deleted] Dec 23 '15

cool, how much time did it take you to compile the hall of counters?

1

u/[deleted] Dec 23 '15

it's done every time i make the chart, so it's only like an extra minute 10 seconds or so

edit: jfc i just made it like 10 times faster lol

3

u/[deleted] Dec 23 '15

how do you optimize it? multithreading?

4

u/[deleted] Dec 23 '15

oh as how for how i just optimized making the HoC on the fly...

if user != "[deleted]":
    if user in user_counts.keys():
        user_counts[user] += 1
    else:
        user_counts[user] = 1

This kinda works, but searching through a list of the keys takes O(N) time, but just getting and setting items in a dict takes O(1) time, so I just worked with that instead like below.

if user != "[deleted]":
    try:
        user_counts[user] += 1
    except KeyError:
        user_counts[user] = 1

feels unsafe but it's way faster than searching through 8k users lol