« first day (452 days earlier)      last day (4487 days later) » 

5:00 PM
@RMartinhoFernandes not necessary. e.g. in COM, object can be not heap-allocated, and have dummy AddRef/Release
 
naked pointers make byte level programmers horny
4
 
@Xaade Chicken should never come without a bacon wrapper. It's called the "smarth chicken idiom".
 
heh. semantic pointer. Let's confuse the SO-users by talking about semantic pointers from now on :)
 
user784668
I need 4 rep points more!
 
@JohannesSchaublitb Even better considering "bitte" is French slang for "penis".
 
5:01 PM
@sehe I just made that term up, but I'm rapidly developing a liking for it.
 
@Fanael devilish
 
@JohannesSchaublitb I had developed a tech for dragging controls in MFC that involved a control instantiating another control that when dropped, altered it's related control's position then deleted itself. I didn't see a problem with it. Although I could have had the drag control be owned by it's originator, and that would delete it instead. But in the world of HWNDs and APIs, is that really needed?
 
evening all
 
@Abyx And...? If you wrap it in a smart pointer, the smart pointer controls when Release is called. I still don't understand how it's the object managing the lifetime.
 
has anyone ever heard the term "imperfect memory disambiguation" and perhaps know what it means?
 
5:01 PM
@TonyTheLion Sounds like language lawyer wank.
 
@EtiennedeMartel lol, well, be it what it may, I'd like to know what it means
 
Memory disambiguation is a set of techniques employed by high-performance out-of-order execution microprocessors that execute memory access instructions (loads and stores) out of program order. The mechanisms for performing memory disambiguation, implemented using digital logic inside the microprocessor core, detect true dependencies between memory operations at execution time and allow the processor to recover when a dependence has been violated. They also eliminate spurious memory dependencies and allow for greater instruction-level parallelism by allowing safe out-of-order execution of...
This maybe?
 
@TonyTheLion I'd not associate it with technology, actually
 
@RMartinhoFernandes it's just calling Release. Object may want not to destroy when counter reaches 0, and may not to have counter at all
 
@TonyTheLion In terms of false childhood trauma recollection?
 
5:02 PM
@KerrekSB Quail should never come without a jalapeno wrapper, subsequently wrapped in a bacon wrapper, with cheese in there somewhere.
 
@KerrekSB hahah :P
 
@Abyx And what happens when no more refs to it exist? How does it end its own lifetime after that?
 
@CatPlusPlus Thanks, that's it
 
@RMartinhoFernandes Magic.
And bullets.
 
@RMartinhoFernandes object may be static-allocated, with dummy AddRef\Release
 
5:03 PM
Possibly.
 
@KerrekSB that's what you get when the therapist mixes rebirthing with guided phantasies
 
user784668
Who on Earth upvoted my question?
 
How does it know it's static-allocated?
 
@sehe I've never been rebirthed, I must say.
 
@Abyx Then the object is not managing shit. Its lifetime is from start to finish. It's the runtime that manages that.
 
5:04 PM
Foo(int a, string b, bool i_am_statically_allocated_dont_try_to_free_this)?
 
@CatPlusPlus Could be a singleton. shiver
 
@Fanael better: who in Hell? They didn't want your company. The good news is, now you can sollicit one downvote on an answer
 
0
Q: Scenario where it is better to use union instread of struct

Abdul SamadCan some give me some scenario where it is wise to use union instead of struct in some problem? Thanks

???
 
@RMartinhoFernandes Don't use the S word around here.
 
but smart pointer accepts any object, with any lifetime-management strategy
 
5:05 PM
i think he should change its title to "What is the difference between struct and union?"
 
@KerrekSB Good for you. I just found out about a (remote) collegues 'wiki profile' (of sorts) that talks at considerable length about such things. We'll have something to laugh about for weeks
 
@KerrekSB Close that shit.
 
@JohannesSchaublitb The "two penguins on one floe" scenario?
 
Smart pointer is lifetime-management strategy.
 
oh
 
user784668
5:06 PM
Wait, downvoting a question doesn't give you -1?
 
@KerrekSB If that question isn't "ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form", then something has gone wrong somewhere.
 
@sehe I might need it at some point after the burnout/crash/second-divorce, so let's keep our options open.
 
please read something about COM
 
@Fanael Nope, it's been that way for a few months now.
 
@Fanael Not anymore.
I don't want to deal with COM, like, ever.
 
user784668
5:06 PM
@EtiennedeMartel few months?
 
@Abyx Is COM still relevant?
 
@Abyx I was hoping you could show an example. Since objects managing their own lifetime is so common, it should be easy.
 
AFAIK, COM objects require you to do manual refcounting.
 
@KerrekSB The guy put a notice on top stating how he was formerly known as 'Richard <lastname protected>' but he changed it to 'Gahan <lastname protected>' in 2004, when he 'made a fresh start with himself'
 
again... smart pointer do refcounting
it call AddRef and Release
 
5:07 PM
Now I'm just confused.
 
@Abyx That makes the smart pointer the one in control of the lifetime!
 
@sehe Well, if it helps -- it's always good if someone wants to better themselves...
 
you can name it smart-AddRef-and-Release-caller
ok
 
It's CComPtr. It already exists.
 
@KerrekSB Shame when they go and make perfect fools of their new selves
 
5:09 PM
@sehe That's true. I'd also think a change of place would be conducive to the process.
 
I'm off to my meet my doom. Or deepen it. Fucking maths.
 
It's probably hard enough to change yourself without everyone around you reflecting your old self back on you...
 
@KerrekSB It's ok, I'm open minded. I'm also a tad sceptical and I only noticed him because of erratic behaviour on that same wiki. It was what made me visit his profile in the first place. :)
 
I'll be back with a new charge of whining in few hours!
 
smart pointer takes object with interface with AddRef and Release methods, but not with public destructor. it can't delete object
 
5:10 PM
@CatPlusPlus Hals und Beinbruch!
 
@CatPlusPlus Reinvent yourself as Kitten Plus Plus or so.
 
@Abyx Ok, then when will the object decide to delete itself?
 
it damned "interface", not "abstract class", so there is no destructor =\
@RMartinhoFernandes it's up to object.
 
@Abyx Give me an example of one object that decides to delete itself.
 
object may count Release calls, or may not
 
5:11 PM
Apparently it's very common, so it should not be that hard to come up with one.
 
user784668
@sehe They do want my company. In fact, I'm one of them already. Just look at my nickname. Doesn't it remind you of Samael?
 
@Abyx And if it doesn't count them, when does it decide it's time to delete itself?
 
@thecoshman Sometimes irony can coincide with wise remarks
 
0
A: Scenario where it is better to use union instread of struct

XaadeIt is wise to use a union whenever you have a data bottleneck, and you have two pieces of data that are mutually exclusive, but available in the same data structure. Let's say I have two messages that have identical data, except for two pieces of data are mutually exclusive between them, and ar...

 
@Fanael Nope. Besides, doesn't my name remind you of Habakuk?
 
5:16 PM
virtual void Foo::release() { if (--m_ref_count == 0) delete this; }
virtual void Bar::release() { /*do nothing*/ }
ISome* create_foo() { return new Foo(); }
ISome* create_bar() { static Bar instance; return &instance; }
// usage:
smart_ptr<ISome> p = create_bar();
 
user784668
@sehe dunno, gotta check the distance
 
Hamming or otherwise?
I'm going home, afk
 
user784668
@sehe Levenshtein.
 
Cheers
 
std::share_ptr<ISome> create_foo() { return std::make_shared<Foo>(); }
std::share_ptr<ISome> create_bar() { static Bar instance; return std::shared_ptr<ISome>(&instance, no_deleter()); }
@Abyx What's the big advantage?
 
5:23 PM
dunno. maybe memory-performance
 
user784668
@Abyx POITROAE!
 
I think it's mostly for legacy reasons.
 
Well, to me it sounds retarted to start a war against the language straight from your design for some possible performance gains.
 
@RMartinhoFernandes What if the design is 20 years old and you have to maintain it?
 
where is "a war against the language" ?
 
5:24 PM
@EtiennedeMartel That's a much different thing.
 
user784668
@EtiennedeMartel I know some people that are younger than that!
 
@Fanael It's almost as old as me.
 
user784668
Oh.
 
user784668
I start to feel old. Again.
 
5:27 PM
@Abyx Well, it requires you to write more code. But I think the worse is that your design fixes the lifetime with the class. My design allows different instances of the same class to have different lifetimes.
 
why did tomalak change his nick
 
@JohannesSchaublitb What is it now?
 
user784668
@KerrekSB Lightness Races in Orbit. I think.
 
@Fanael Oh, that's who that is
 
@KerrekSB Maybe you haven't seen him complain about the STL since he changed names. If you had I bet you would have noticed immediately ;)
 
5:29 PM
@RMartinhoFernandes it doesn't require to write more code. all boilerplate code can be put in a library, like shared_ptr is
 
@RMartinhoFernandes Or about my semicolon abuse.
 
user784668
@KerrekSB Semicolon abuse?
 
@Fanael I don't always use semicolons when I should, and then he points that out.
 
btw, it's not my design
 
@Abyx Note how yours has two more lines (and you haven't implemented AddRef!).
@Abyx Well, the design in your example.
 
user784668
5:31 PM
@KerrekSB example?
 
And wouldn't putting the boilerplate in a library be like reinventing shared_ptr?
 
Two statements can be connected, I should separate them with a semicolon and not a comma.
 
@RMartinhoFernandes actually it requires something like class Foo : intrusive_refcnt_base<Foo>
 
@JohannesSchaublitb My arch-nemesis is trying to find new ways to annoy me!
 
user784668
5:33 PM
@KerrekSB oh, if that's the case, you deserve a life sentence!
 
@Fanael Indeed. Now I roam unchecked!
@Xaade Who's the nemesis?
 
user784668
@KerrekSB Tomalak?
 
@Fanael oh, explains a lot. I was wondering who this person was I hadn't heard of
 
@Abyx I see. But that still encodes the lifetime policy in the class.
Which, btw, is exactly one of the bad things about a singleton.
 
@Fanael Ohh. No, I would not go that far.
 
5:34 PM
hmm.... can shared_ptr be used with multiple inheritance?
 
There are some genuine nemeses out there, who inflame without contributing...
Can you see someone's name history?
 
@KerrekSB Only mods, or selves.
 
@RMartinhoFernandes Shame.
 
user784668
Come on, you guys really didn't realize it's him? It took me the time required to read one his comment.
 
5:36 PM
is it possible to get shared_ptr<IOther> from shared_ptr<ISome> ?
 
user784668
@Abyx Yes.
 
I can't get how queryinterface will look like
 
(Assuming they're related somehow, of course)
 
user784668
@Abyx static_pointer_cast
 
5:37 PM
std::shared_ptr is pretty close to magical.
 
@KerrekSB Apparently none of you ever saw our conversations.
 
@Abyx only if IOther is the type of a baseclass subobject or the type of the complete object of what the ISome ptr points to
 
user784668
@RMartinhoFernandes std::shared_ptr is pretty close to dull.
 
@KerrekSB you sent your message back in time!
 
@Fanael He plays devil's advocate against everything I say. Often I wonder if it's just to extend the discussion. I can't imagine someone being sanely that much different from me.
 
5:38 PM
@Xaade No. But I did see lots of valuable contributions form both of you, which is how I like to think of you :-)
 
@RMartinhoFernandes it wasnt Kerrek...
 
@RMartinhoFernandes How so?
@KerrekSB Like this?
 
I mean shared_ptr<ISome> x; shared_ptr<IOther> y = x->query(IOther_ID);
 
user784668
@Xaade That happened to me at least once, I know the drill.
 
@KerrekSB Look at the screenshot. And check the timestamps.
 
5:39 PM
@RMartinhoFernandes Your browser must be weak. We need std::atomic<chat>
 
@RMartinhoFernandes it was someone else who directed at @KerrekSB
 
A fence is just 100 nops, isn't it? So we need something like 100 empty messages to ensure proper ordering.
 
@KerrekSB Oh, the chat is already atomic. What we need is strong ordering.
 
@KerrekSB Then you don't know how nemesis system works. When you have a nemesis, as long as you both aren't present, both parties are relatively reasonable in nature. As soon as the two share space, one or both lose that reasonableness. Since I'm the trollking, I usually fault myself so he'll shut up.
 
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm‌​mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm‌​mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
what's this
 
5:41 PM
@JohannesSchaublitb I want to flag it
 
@Abyx You need to have query return a shared_ptr, but yeah, that could work with some syntax changes.
 
@Xaade Interesting. So we need cycle detection.
 
@JohannesSchaublitb this guy stealth trolls. Although it's not too stealthy this time.
 
@RMartinhoFernandes I thought atomics come with ordered access?
 
@KerrekSB By default, yes, but that's optional.
 
5:42 PM
depends on the type of access you use
 
@RMartinhoFernandes The default is optional?
 
aquire, release, relaxed or both former two
 
@KerrekSB You can override the default :)
 
Hm, the default is optional would make for a good techno song hook
 
@KerrekSB That's why I fault myself. The remaining reasonable people in the room either inform me that I'm not a fault, or they stay silent. Either way, people stop losing. And that's a win.... of sorts.
 
5:43 PM
but i could remember it incorrectly
 
@Xaade I think anyone in their right mind would stay out of picking sides in such a situation!
 
I believe AquireRelease is called "Ordered"
 
WhaT_ThE_F*cK_Is_ThiS_WeirD_NaminG_ConventioN? It seems like the developer didn't want anyone to understand his code.
SamplE_FunctioN ()
 
@IntermediateHacker I propose naming it StupiD_CasE.
 
@IntermediateHacker: wow, thats an ugly naming convention
 
5:45 PM
but it's readable
 
@IntermediateHacker It might be to avoid clashes with user code.
 
RoTaTiNg CaPs FoR tHe WiN.
 
@KerrekSB I have but one pet peeve. That anyone insults my intelligence by insinuating that an intellectual cannot have religious beliefs. Outside of that, anything I say that sounds remotely harsh is just your casual mutually respected violent debate.
 
It's so weird.
 
e.g. samplefunction is less readable
 
5:47 PM
@IntermediateHacker ____what _______the ___________fuck __is ___microsoft ____defined __types ___doing _______this ___________________for?
 
ItS_DifficulT_To_TypE_ToO
@Xaade to avoid clashes with other code?
 
@RMartinhoFernandes It's called BowL_TraiN
@IntermediateHacker TheN_YoU_HavE_YouR_AnsweR
Actually you just hold shift for the last letter, underscore, first letter.
Not hard to type at all
YoU_DO_IT_QuitE_NaturallY_AfteR_A_WhilE
 
DamN_Im_GettinG_UseD_To_It
 
Can we please get back to proper writing?
 
HopE_I_DonT_StarT_UsinG_It_In_My_CodE.
 
5:51 PM
So maybe you should stop using it in your writing ;)
 
AnnoyinG
 
I_CanT_StoP_It!!!
ItS_AddictivE.
 
@IntermediateHacker: just remove the shift and capslock keys from your keyboard and stopping that will come naturaly to you
 
lol, what about the underscore?
 
@IntermediateHacker remove that too
@Grizzly I knew a guy who had a "home-made" keyboard with the tilde, start, F1, and many other buttons missing. Basically, every key not used in starcraft. He'd use it just for starcraft to keep him on the right keys.
 
5:55 PM
@MooingDuck Where's the "start" key?
 
@RMartinhoFernandes between CTRL and ALT on Windows keyboards
 
Oh, Super.
 
@RMartinhoFernandes I dunno what it's called
 
it's "win" key
 
:2341281 probably
 
5:56 PM
@MooingDuck The non-OSist name is Super.
But it's very commonly known as "Win".
 
what the... I hate MSVC10
why are my asserts after my timing tests affecting the timing tests in release builds?
 
If OSes had rights, Windows would be a racist.
 
@Grizzly My sister also removed her INS key. There's no reason for that to exist anyway for most people. It's there for coders and ASCII art.
 
@MooingDuck With "release builds" you imply -DNDEBUG, right?
 
I broke my notebook's mouse-thing key,
 
5:58 PM
@RMartinhoFernandes I thought it did so by default. I'll have to go find that setting.
 
What do you use "Insert" for in code?
 
Between the right arrow key and CTRL.
 
@RMartinhoFernandes lining up comments and stuff
 
@RMartinhoFernandes In IDEs you use it for triggering edit modes
 
Oh, you mean like R :P
 
5:59 PM
What's the Mouse-thing key used for anyway?
 
@IntermediateHacker To popup context menus.
 
1 message moved to Sandbox
 
@RMartinhoFernandes wow my code is five times faster!
 
Is the sandbox only for chat bots?
 
@MooingDuck I'm awesome.
 
6:09 PM
this is so weird.
 
user784668
@IntermediateHacker what?
 
@Fanael DIdn't you see the awesome site that link led to?
 
user784668
There's no website.
 
@IntermediateHacker Error 105 (net::ERR_NAME_NOT_RESOLVED): Unable to resolve the server's DNS address.
 
user784668
It's just the browser's "not found" error page.
 
user784668
6:11 PM
Nothing awesome nor weird in it.
 
it only works with firefox
 
user784668
@IntermediateHacker If it doesn't work on any browser, how are us supposed to view it?
 
@IntermediateHacker Firefox can't find the server at __.com.
 
@MooingDuck lol, you fell for it.
in Sandbox, 5 mins ago, by IntermediateHacker
I can annoy people like this
 
@IntermediateHacker That's supposed to be trolling? You need practice.
@IntermediateHacker I was just grabbing firefox's message. I liked chrome's better.
 
user784668
6:16 PM
@IntermediateHacker lol, you fell for it. None of us actually opened the link.
 
@Fanael I did, merely to get the correct browser error messages for him
 
user784668
@MooingDuck okay, so I didn't open it.
 
GAH COMPUTERS MAKE NO SENSE!
 
user784668
Why?
 
I have a comparitor bool operator<(const payload& rhs) const {++payload_comp_count; return data[0]<rhs.data[0];}, and std::map is twice as fast as my container. But if I remove the ++payload_comp_count, then my container is four times faster than std::map. I've also shown that my container calls the comparitor less often than std::map.
 
user784668
6:22 PM
@Fanael s/us/we/
 
user784668
Profile.
 
user784668
Cache-related issue, maybe?
 
user784668
No clue, actually.
 
@Fanael It's highly duplicatable, and I run each test for 100ms before I begin timing it,
 
user784668
What's that payload_comp_count thingy?
 
6:24 PM
@Fanael it counts how many times the comparitor is called, to confirm my container calls it less than std::map
 
user784668
@MooingDuck it's possible to miss the cache consistently.
 
@Fanael I backported to MSVC9 once, and it's profiler was mostly useless.
 
user784668
@MooingDuck What profiler?
 
@Fanael the one built into MSVC9?
 
user784668
@MooingDuck Ah, no wonder it was useless.
 
6:25 PM
@Fanael it just probes the stack every X ms. Maybe I could increase the frequency...
 
user784668
Yeah. I'd rather use a low-level profiler in this case.
 
@MooingDuck: have you looked at the resulting assembly?
 
@Grizzly I'm too stupid for assembly. I'll look though. Once I figure out how
 
user784668
@Grizzly Oh right, good point.
 
or tried different compilers?
 
user784668
6:27 PM
@MooingDuck What compiler?
 
@Fanael MSVC10
 
it's probably a cache issue
 
user784668
@MooingDuck Then /FAs will give you assembly listing.
 
if the std::map implementation has room for payload_comp_count in a cache line, then incrementing it will yield little additional cost
but if you're tight with cache lines, then you might have to expend an entire extra line for payload_comp_count, which will be a lot
 
@DeadMG: so payload_comp_count is not in the cache?
 
user784668
6:28 PM
@Grizzly None of us can know.
 
or a high level, like L3 instead of L1
 
user784668
@Grizzly That's why I told you to profile.
 
that seems unlikely unless the nodes are really big
@Fanael: why should I profile?
 
or the processor fits a lot of them on to a single line
 
user784668
@Grizzly To find out why it's slow?
 
6:29 PM
@Fanael my code, not his :D
 
you do realize we are not talking about my code, write?
 
user784668
Oh.
 
user784668
Darn it.
 
user784668
Got confused, sorry.
 
@MooingDuck: Have you tried a different compiler? Might be MSVC simply being a bit braindead (like usual from what I read)
 
user784668
6:32 PM
I've seen someone answering and didn't realized that it's not the OP.
 
@Grizzly I only have the one compiler, haven't gotten around to learning another
 
user784668
@MooingDuck So what compiler do you use?
 
@Fanael MSVC10
 
user784668
Fuck, I already asked you this question and you already answered. Gotta have some rest, I guess.
 
@Fanael :P
 
user784668
6:35 PM
Anyway...
 
@DeadMG I can't imagine how one would address that besides switching to a less stupid compiler
 
user784668
Care to show us the assembly listing?
 
@MooingDuck: Using mingw with eclipse or qtcreator isn't all that hard. Its just that all articles I have found so far seem to indicate that MSVC is really bad at optimising compared too both icc and gcc
 
you wouldn't address it, you'd see the same behaviour in std::map if you just increase the comparator size
it's a micro-optimization and a non-problem, realistically
 
@DeadMG it's making my code 8 times slower
 
6:36 PM
that's cache
 
@DeadMG: I still think its very unlikely to have that much of an impact
 
what you need to say is "It's makin my code 8 times slower for this absolutely tiny case, and if I, say, increment two variables instead, then map becomes 8 times slower too."
 
user784668
@DeadMG he doesn't see the same behavior in std::map if I understand correctly (I'm very unsure about that now).
 
considering that there will be lots of cache misses anyways for any maplike structure
 
@Fanael the std::map is using the same comparitor and is faster when the increment is present.
 
6:38 PM
@DeadMG: Where is the information about the size of the testcase to say that its tiny?
 
@Grizzly My container is a sorted vector of 16 8-byte PODs
 
he posted the code
 
user784668
@MooingDuck so I understand correctly. Surprisingly enough.
 
@DeadMG: The code calling the comparisons? Must have missed that
 
no, just the comparator
 
user784668
6:40 PM
-2
Q: inheritance compile time or run time?

harisIn c++, does inheritance occur at run time or compile time? Examples?

 
but the point is the same
 
user784668
WTF?
 
having data for a comparator that uses 8 bytes of executable memory only isn't a realistic profile point
you'd need to profile with varying comparator sizes and complexities
 
@DeadMG: Well it is a relatively common scenario
 
how many accesses do you think you'll get with std::string?
lots
 
user784668
6:43 PM
I gotta go before I mix up even more people.
 
user784668
Bye.
 
I can't say I'm tempted to use std::string as a key for a map in a performance critical part of the code very often
 
@DeadMG the point was to optimize this container for a small number of small objects. If people want big counts or objects, they can use std::map
 
then your larger comparator doesn't accurately reflect the intended use case
 
@MooingDuck: Did you try your performance test with boost::flat_map to see if that works better?
 
6:47 PM
@Grizzly I'm reinventing the wheel, I know. I didn't know that existed until I ran into this problem.
 
that too, but not the point
 
@Grizzly I don't have boost. I'll learn that eventually too.
 
since that is very similar to your container, performance differences to that one might make it easier too find bottlenecks
@MooingDuck: That can be easily enough remedied, particulary for most boost libraries which are header only anyways
 
@Grizzly profiling doesn't show much since these functions are all almost entirely inlined.
 
download boost, put the headers at the correct location, use it ;)
but I gotta go, so bye and good luck with your optimization @MooingDuck
 
6:50 PM
aw, frickin... Thanks whoever told me to check the ASM
 
that would be me
 
when the comparitor increment isn't there, the compiler removed my find function call entirely. No wonder it was so much faster.
 
ah the wonders of inlining
 
@Grizzly that explains SO MUCH
 
didn't you output the found variable or something?
 
6:53 PM
@DeadMG no
 
well, that was kind of silly
 
@DeadMG yeah :( I'm altering it now to accumulate the first byte of the found data.
 
always fill the container with run-time random generated data, and output the found variable
 
@DeadMG output the found slows the test down though
 
WTF, why the hell would you include I/O code in your test?
you are profiling only the find call, right?
 
6:55 PM
@DeadMG yet again, I didn't think through what you said. Just output the last one. Got it
 
@MooingDuck: you don't do the output during your test, you accumulate the results (or something like that) and do one output at the end
to keep the compiler from realizing that your whole code is basically a noop and doing dead code optimization on it
 
@Grizzly yeah, I'm doing that now. Just forgot in these tests
 
not the last one, otherwise everything but the last might be optimized out
 
@Grizzly it's a loop, I don't think it can skip all but one iteration
Alright, so my code is definitely slower than std::map even for small numbers of small objects for lookup.
 

« first day (452 days earlier)      last day (4487 days later) »