How many calculations can a normal computer do every second?

Ughubughughughughughghlug

RIP Cats 4/20(blaze it)/25
kiwifarms.net
Joined
May 14, 2019
I'm building a program in C++ on my normal Intel Core i7. The program is basically a text-based map generator.

At the end of the process, it's generating "plates" and "borders" (that have various details describing them), and the plates and borders are grouped together into larger areas that are themselves described with variables.

In a worst-case scenario, I can expect 585,316 plates to be produced in my current, small maps, although I intend to build much larger maps.

The size of this frightens me, but I assume that normal programs already run numbers of calculations orders of magnitude larger than that.

Will my C++ text program brick my laptop?
 
Any program can brick your laptop if it is poorly written. A good processor can process on the order of 100,000,000 mathematical calculations per second, but if your code is incredibly unoptimized you'll need a supercomputer to run it.
 
Minecraft has been already created.

Oh, it's much more autistic than that. It's a map generator for a space 4X game that I don't plan to actually create, because I don't know how to do anything beyond the most basic programming, but which I like to model as a hobby in itself.

I've got it built already to where the user can interact with the black text box to explore data on each star, planet, dwarf planet, and moon in orbit around a particular star. What remains to be done is building in statistical analysis, a save feature, and most significantly but also most difficult, the surfaces of the heavenly bodies.

The worst of it all will be creating a program that can simulate river systems on planetary surfaces, simply because the logic behind it is so complex.

Any program can brick your laptop if it is poorly written. A good processor can process on the order of 100,000,000 mathematical calculations per second, but if your code is incredibly unoptimized you'll need a supercomputer to run it.

I assume mine is Hell-tier as all I know is information from one introductory-level class. I know nothing about programming beyond that.



Basically, I'm building a map generator for a poor man's Stellaris, except since it's just my fantasy dream game, it has ship combat which is more complicated than FTL: Faster Than Light and an economic model that's way more complicated than Victoria II, and the entire world design is based off whatever I personally like rather than what's realistic. I'm mainly just building the map generator as practice so that I don't forget what I learned from the class, as well as so that I have a way of seeing actual examples of what my generator produces, since the logic behind it is way too complicated for me to calculate through it by hand.

For example, I've discovered that my design makes the world skew extremely heavy in favor of brown dwarves, and that in a galaxy of 166 stars it will always generate about 5 - 7 habitable planets, almost all of them of extremely shitty quality.
 
Brick your laptop? The processor in your laptop will throttle if it starts to overheat. If it's still running dangerously hot whilst throttling it will shut itself off. I guess the biggest issue with stressing the processor constantly would be the fan wearing itself out sooner, but those things last for years.

If you're worried about your laptop overheating you can go into the power settings in Windows, then into the Advanced settings for your power plan and under Processor power management set the "Maximum processor state" to something like 80% then run a stress test and see what your thermals are.

1565857803650.png


For checking your processor temperature download Speccy :


Anything below 75 degrees is fine for a stress test. Maybe 80 but that's pushing it.

Obviously capping your processor's performance is going to lead to less... performance. But if your laptop is overheating then that's maybe what you'll have to do.
 
Last edited:
Any program can brick your laptop if it is poorly written. A good processor can process on the order of 100,000,000 mathematical calculations per second, but if your code is incredibly unoptimized you'll need a supercomputer to run it.

Dwarf Fortress beats me before I even start the game.
 
  • Agree
Reactions: 1 person
Okay, so my map as is could be produced one of two ways.

It's basically a region of a square grid, a sort of cutout. I was thinking of using Cartesian coordinates to designate star location although I know that huge chunks of space will not be used for anything, so the array entries will be empty and will never be displayed in the visual output.

Thus, I can dynamically allocate an array of size 14,040 and have it generate on every one of the x, y coordinates, or I can curtail the size of the array to the minimum space needed but then have to map the x-y coordinates by hand instead of using the for loop to do that.
 
Okay, so my map as is could be produced one of two ways.

It's basically a region of a square grid, a sort of cutout. I was thinking of using Cartesian coordinates to designate star location although I know that huge chunks of space will not be used for anything, so the array entries will be empty and will never be displayed in the visual output.

Thus, I can dynamically allocate an array of size 14,040 and have it generate on every one of the x, y coordinates, or I can curtail the size of the array to the minimum space needed but then have to map the x-y coordinates by hand instead of using the for loop to do that.

I think you want a sparse array...

Otherwise you will take up too much space and run out of RAM.
 
I think you want a sparse array...

Otherwise you will take up too much space and run out of RAM.

I can remove maybe about 5,000 to 6,000 from the array that way.

It's also occurred to me that I need to prototype the planetary surface generation program separately, so I could also just run the galaxy program, record the data on the planets that are interesting, and then feed the data by hand into the planet generator.
 
Back