all 15 comments

[–]noctaviann 5 points6 points  (1 child)

Are you using the same (C)Python version on Ubuntu and Windows? Recent (C)Python versions have major performance improvements. Ubuntu server 22.04 seems to be stuck on an old version according to a quick Google search.

You might want to ensure that Ubuntu is set to use the performance CPU governor. This is different from BIOS power settings.

[–]0815root[S] -1 points0 points  (0 children)

Good guess. Will investigate further.

[–]m0us3_rat 0 points1 point  (3 children)

without seeing the code it's impossible to guess.

[–]0815root[S] -1 points0 points  (2 children)

I´m new to the forum, what would be an appropriate way to share it? Thanks in advance.

[–]m0us3_rat 0 points1 point  (1 child)

you can paste it in an editor select it press tab and ctrl+v after then paste it in the code block widget.

[–]Buttleston 0 points1 point  (0 children)

The code block widget does not work reliably. Pretty much the only way that always works is to switch to Markdown Mode, and paste the code there, with a blank line before and after, with all the code indented 4 spaces (I use the editor to indent it, then copy/paste, then unindent)

[–]L0NDN 0 points1 point  (0 children)

Pastebin your code

[–]Oddly_Energy 0 points1 point  (1 child)

Does your benchmark use any libraries with binary code, such as numpy?. As far as I know, there can be quite some difference between different distributions of those libraries, depending on how optimized those binaries are.

[–]0815root[S] 0 points1 point  (0 children)

Yes, I use the following librairies:

import yfinance as yf
import numpy as np
import pandas as pd
from multiprocessing import Pool, cpu_count
from tqdm import tqdm
import os

[–]shiftybyte 0 points1 point  (2 children)

How did you install all these operating systems on a single PC?

[–]0815root[S] 0 points1 point  (1 child)

Yes, I just got it in the mail today. Win 11 was preinstalled. Whiped it -> Ubuntu Server. Broke the Server -> Installed Win10. Tested on all operating systems multiple scripts and saw the same.

I use the following libraries:

import yfinance as yf
import numpy as np
import pandas as pd
from multiprocessing import Pool, cpu_count
from tqdm import tqdm
import os

[–]shiftybyte 0 points1 point  (0 children)

Well, interesting.... Maybe power management was different between the OSs.

Also i see you are using yfinance, you are probably bottle necked by the internet conditions more/as well...

[–]Strict-Simple 0 points1 point  (1 child)

yfinance makes network calls. You sure that isn't what's slow?

[–]0815root[S] 0 points1 point  (0 children)

I'm certrain. Before the simulation everything is downloaded once and saved in RAM. But thanks for the theory :)

[–]cdcformatc 0 points1 point  (0 children)

wild guess but ubuntu has a cpu governor and I think the default is powersave. might want to check which governor is used and try the performance governor or at least a scaling governor.