mikeagn / sparsehash

Automatically exported from code.google.com/p/sparsehash
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

The windows optimizer optimizes code away, such that map_fetch takes zero time. #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. run time_hash_map on with msvc 7

What is the expected output? 

some ns spend with STANDARD HASH_MAP map_fetch and map_fetch_empty

What do you see instead?

0 ns spend with STANDARD HASH_MAP map_fetch and map_fetch_empty

I attach a patch (on top of the 0.6-win patch) that pretends to use the "r"
value computed by map_fetch and map_fetch_empty. With this map_fetch and
map_fetch_empty give some reasonable "ns".

Original issue reported on code.google.com by tobias.p...@googlemail.com on 23 May 2007 at 9:17

Attachments:

GoogleCodeExporter commented 9 years ago
This could be a problem for other systems as well.  I'll fix it for the next 
release.

Original comment by csilv...@gmail.com on 23 May 2007 at 10:02

GoogleCodeExporter commented 9 years ago

Original comment by csilv...@gmail.com on 24 May 2007 at 1:09

GoogleCodeExporter commented 9 years ago
I just made the 0.7 release, which should fix this.

Original comment by csilv...@gmail.com on 11 Jun 2007 at 7:48