Load2Map

근황: 그래 이게 옳게 된 결과지...

C#으로 만들어진 인구 시뮬레이션 결과에 납득하지 못해서 C++로 코드를 옮겨서 스레드를 돌려봄.

스레드까지 시간 배분도 착실히 해서 만든 결과 1000만명 나이/사망자 랜덤 처리만 평균 2%대 아래의 CPU점유율을 보여줌.. 아직 개선여지가 남아 있어서 더 낮출 수 있을지도 모르겠음.

암튼 C#쪽은 내가 뭔가 잘못한듯...

* C# 스레드 타이밍을 다시 조정해서 점유율 11% 까지 도달했으나 어디를 더 줄여야 할지 초보자한테는 어려운 문제...

----
"Yeah, this is the result I was aiming for...

I wasn't satisfied with the population simulation results made in C#, so I moved the code to C++ and ran it using threads.

After carefully managing the time distribution for the threads, I achieved an average CPU usage of just 2% for processing random age/mortality for 10 million people. There might still be room for improvement, so I could lower it even further.

Anyway, I probably did something wrong on the C# side..."


* I adjusted the thread timing in C# again and managed to bring the CPU usage down to 11%, but figuring out where to reduce it further is a challenging problem for a beginner...

1 year ago (edited) | [YT] | 27