Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Vector performance on a specific situation
Re: Vector performance on a specific situation [message #40138 is a reply to message #40137] Wed, 19 June 2013 09:14 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14261
Registered: November 2005
Ultimate Member
crydev wrote on Wed, 19 June 2013 03:03

Thank you for your answers.

sizeof(T) is 16-bytes.

struct
{
     unsigned int;
     int;
   
     struct
     {
          int;
          int;
     }
}


What my code does is reading a struct instance from the vector and editing the two integer fields in the sub-struct.


This does not sound like awful lot of computation. I think that single thread will handle the task as fast or perhaps faster than multiple threads...

Now if you had 3 millions of elements instead of 300...

(Of course, I can still be mistaken about the amount of computation per element performed. Have you benchmarked that (I mean, single-threaded time to do one element)?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Error in XML Read
Next Topic: Troubles compiling code with -fPIC
Goto Forum:
  


Current Time: Fri Jun 20 03:51:36 CEST 2025

Total time taken to generate the page: 0.03962 seconds