Home » Community » U++ community news and announcements » Refactored Value coming....
Refactored Value coming.... [message #35129] |
Sun, 15 January 2012 19:02 |
|
mirek
Messages: 13980 Registered: November 2005
|
Ultimate Member |
|
|
I have spent last 3 weeks refactoring Value, the goal being that most of standard values (like String or int) should be "small value optimized" (in the end, interface allows user-defined types to be svo stored as well).
In the end, I believe that I have succeeded. sizeof(Value) grew to 16, but any standard value exept WString, Complex, ValueMap and ArrayMap are now stored 'directly' into those 16 bytes (older implementation always used reference counted shared data).
I have to say I have expected better improvements in terms of speed; what I am getting in syntetic benchmarks is about 40% improvement. But some operations are significantly faster; e.g. storing int to Value is now just two CPU dword assignements (before it involved allocating memory and setting up shared object), likewise extracting int from Value is about 4x faster now.
Plus, memory consumption should be better too.
Means, despite some disappointment, new Value implementation is better - and I have cleaned the interface a bit too. So it will go into mainline sources, but there is no hurry. This is significant change and I would like more testing (despite the fact I have tried to unit-test this as much as possible).
New Core with svo_value is here:
svn://www.ultimatepp.org/upp/branches/svo_value
and I would like to ask everybody, for the sake of breaking/non-breaking your code, please try to checkout this, compile your mission critical (or not) projects with this new Value implementation and report any irregularities!
I think I will be finally merging svo_value sometimes in March. So please, test before that
Mirek
|
|
|
|
|
Refactored Value coming....
By: mirek on Sun, 15 January 2012 19:02
|
|
|
Re: Refactored Value coming....
|
|
|
Re: Refactored Value coming....
By: mirek on Mon, 16 January 2012 15:34
|
|
|
Re: Refactored Value coming....
By: kohait00 on Tue, 17 January 2012 11:45
|
|
|
Re: Refactored Value coming....
By: mirek on Tue, 17 January 2012 11:54
|
|
|
Re: Refactored Value coming....
By: koldo on Tue, 17 January 2012 12:25
|
|
|
Re: Refactored Value coming....
By: mirek on Tue, 17 January 2012 13:48
|
|
|
Re: Refactored Value coming....
By: koldo on Tue, 17 January 2012 14:28
|
|
|
Re: Refactored Value coming....
By: koldo on Wed, 18 January 2012 09:17
|
|
|
Re: Refactored Value coming....
By: koldo on Thu, 19 January 2012 11:39
|
|
|
Re: Refactored Value coming....
By: mirek on Mon, 30 January 2012 15:56
|
Goto Forum:
Current Time: Mon May 13 23:48:49 CEST 2024
Total time taken to generate the page: 0.02338 seconds
|