Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: My poor SFML games run very slow on 64 bit system  (Read 7577 times)

0 Members and 2 Guests are viewing this topic.

Tigre Pablito

  • Full Member
  • ***
  • Posts: 226
    • View Profile
    • Email
My poor SFML games run very slow on 64 bit system
« on: August 06, 2015, 06:57:08 pm »
Hello, Ladies and Boys from SFML

from these DLL files: csfml-graphics-2, csfml-window-2, csfml-audio-2, libsndfile-1, openal32, sfmlnet-graphics-2, sfmlnet-audio-2, sfmlnet-window-2

Could someone of you tell me which of these I should add in the references node (that would be build with the EXE when compiling) and which I should copy at the same folder than the EXE ?

On a 64 bit sistem with 3.5 GHz processor both games run alright, but on my 2.3 GHz processor they run very slow

Thanks in advance

Pablo

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: My poor SFML games run very slow on 64 bit system
« Reply #1 on: August 06, 2015, 07:05:13 pm »
from these DLL files: csfml-graphics-2, csfml-window-2, csfml-audio-2, libsndfile-1, openal32, sfmlnet-graphics-2, sfmlnet-audio-2, sfmlnet-window-2

Could someone of you tell me which of these I should add in the references node (that would be build with the EXE when compiling) and which I should copy at the same folder than the EXE ?
Ehh. The ones you actually use?

On a 64 bit sistem with 3.5 GHz processor both games run alright, but on my 2.3 GHz processor they run very slow
Are you building with compiler optimizations enabled? If not then start by doing that.
Do you have the proper graphics drivers installed to enable hardware accelerated OpenGL rendering? If not then install them.

Also, please read these links:
 http://www.catb.org/esr/faqs/smart-questions.html
 http://sscce.org/

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: My poor SFML games run very slow on 64 bit system
« Reply #2 on: August 06, 2015, 07:37:55 pm »
Per frame operations with STL containers?

GraphicsWhale

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: My poor SFML games run very slow on 64 bit system
« Reply #3 on: August 06, 2015, 07:45:43 pm »
The frequency of the processor does not determine the performance, and that's not even mentioning core count. You also have to take into consideration other factors like the OS, graphics device, background processes, etc. Your computer could just be really slow or something's wrong with your game. It's unlikely the fault of SFML.

It'd be helpful to know:

- The language(s) you're using
- The compiler (and version) you're using
- The version of SFML you're using
- The compiler options
- The computer's specs (CPU model, graphics device model, OS, etc)
- Benchmark information (use SFML's timers to see the average time spent rendering, average time spent updating logic, etc)
- You're games source

These are a bit general, but based off of wild guesses you could try:
- Updating the drivers
- Stop background tasks
- Turn on compiler optimizations
- Improve your code (not be applicable if it's your computer's fault, but it may be yours)

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: My poor SFML games run very slow on 64 bit system
« Reply #4 on: August 06, 2015, 08:25:11 pm »
Per frame operations with STL containers?
Sorry, but this doesn' make sense to me.
Are you implying that STL containers are inherently slow? If so, I would tend to disagree (and would like concrete examples where you can out-perform STL containers while still providing the same functionality - like, try to beat std::vector (sure std::array for some cases, but not with the same functionality)).
« Last Edit: August 06, 2015, 08:28:51 pm by Jesper Juhl »

Tigre Pablito

  • Full Member
  • ***
  • Posts: 226
    • View Profile
    • Email
Re: My poor SFML games run very slow on 64 bit system
« Reply #5 on: August 07, 2015, 04:17:46 am »
Hi people,

I'm trying to get or update the graphics accelerator drivers, as one of you told me

does anyone know from where I can download them?

mi system is Pentium Dual Core t4500 2.3 GHz

thanks again

pablo

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: My poor SFML games run very slow on 64 bit system
« Reply #6 on: August 07, 2015, 08:14:38 am »
Sorry, but this doesn' make sense to me.
Are you implying that STL containers are inherently slow? If so, I would tend to disagree (and would like concrete examples where you can out-perform STL containers while still providing the same functionality - like, try to beat std::vector (sure std::array for some cases, but not with the same functionality)).
I mean this:
void MyNoobMegaFunction(std::vector<MegaObject> objects)
or this
void MySecondCoolFunction(std::string id, std::map<std::string, MegaObject> objectsMap)

STL is not slow, sure. But STL allows to programmer to make it VERY slow.




eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
AW: Re: My poor SFML games run very slow on 64 bit system
« Reply #7 on: August 07, 2015, 08:25:15 am »
does anyone know from where I can download them?

mi system is Pentium Dual Core t4500 2.3 GHz
That's the CPU, tou need a driver for the GPU. Check out your GPU vendor's website (AMD, Nvidia or Intel).
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: My poor SFML games run very slow on 64 bit system
« Reply #8 on: August 07, 2015, 04:24:57 pm »
I mean this:
void MyNoobMegaFunction(std::vector<MegaObject> objects)
[...]
STL is not slow, sure. But STL allows to programmer to make it VERY slow.
Sure, copying large objects is a slow operation. Sure, copying many large objects is a much slower operation. This isn't due to STL, though. It would be just as slow if you were making a copy of an array instead of a vector, although passing an array to a function technically just passes the pointer.

The solution, of course, is to pass by reference (preferably) or pointer  :)
void MyNoLongerNoobMegaFunction(std::vector<MegaObject>& objects);
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: My poor SFML games run very slow on 64 bit system
« Reply #9 on: August 07, 2015, 04:39:33 pm »
Guys, keep it on topic please and start another thread if you want to demonstrate how to make the STL slow... not to mention the OP is using SFML.NET/CSFML for his program and he still hasn't shown any code to demonstrate what is making that slow.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: My poor SFML games run very slow on 64 bit system
« Reply #10 on: August 08, 2015, 10:45:45 am »
Sure, copying large objects is a slow operation. Sure, copying many large objects is a much slower operation. This isn't due to STL, though. It would be just as slow if you were making a copy of an array instead of a vector, although passing an array to a function technically just passes the pointer.

The solution, of course, is to pass by reference (preferably) or pointer  :)
void MyNoLongerNoobMegaFunction(std::vector<MegaObject>& objects);
Believe me, I know it. But we still didn't see any source codes of topic starter. So, I was just guessing. Because it's the common mistake of newbies.
« Last Edit: August 08, 2015, 10:48:35 am by ChronicRat »