D&D Dice Roller

D&D Dice Roller

2 devlogs
1h 44m
•  Ship certified
Created by Alexey

Rolls your D&D character stats millions of times, giving you the best result.

I already have a Python script that performs this task, but it's fairly slow, taking around 9.8 seconds to process a million roles. This time, I am using Go and leveraging multithreading to make it incredibly fast.

Speed Summary (For 1 million stat rolls):
Python ~9.8
Go ~850 ms
Go (multithread) ~150-200 ms

Timeline

Ship 1

0 payouts of shell 0 shells

Alexey

16 days ago

Alexey Covers 2 devlogs and 1h 44m

It turns out that multicore functionality in Go is even easier than I expected, so I managed to add multicore support a lot quicker than I expected. It can now roll your stats 1 million times in ~150-200 ms.

Update attachment

This is my first time using GO, so it is taking me a while to get basic stuff done. I got a very simple D&D dice roller worker, but it's currently not utilising multithreading. However, it still destroys the Python script in speed, taking only 850ms compared to 9.8 seconds (for 1 million rolls).

Update attachment