google_hash 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. data/README +21 -0
  2. data/Rakefile +11 -0
  3. data/VERSION +1 -0
  4. data/ext/extconf.rb +15 -0
  5. data/ext/go.cpp +109 -0
  6. data/ext/sparsehash-1.5.2/AUTHORS +2 -0
  7. data/ext/sparsehash-1.5.2/COPYING +28 -0
  8. data/ext/sparsehash-1.5.2/ChangeLog +167 -0
  9. data/ext/sparsehash-1.5.2/INSTALL +236 -0
  10. data/ext/sparsehash-1.5.2/Makefile.am +157 -0
  11. data/ext/sparsehash-1.5.2/Makefile.in +1019 -0
  12. data/ext/sparsehash-1.5.2/NEWS +0 -0
  13. data/ext/sparsehash-1.5.2/README +149 -0
  14. data/ext/sparsehash-1.5.2/README.windows +25 -0
  15. data/ext/sparsehash-1.5.2/TODO +28 -0
  16. data/ext/sparsehash-1.5.2/aclocal.m4 +868 -0
  17. data/ext/sparsehash-1.5.2/compile +99 -0
  18. data/ext/sparsehash-1.5.2/config.guess +1516 -0
  19. data/ext/sparsehash-1.5.2/config.sub +1626 -0
  20. data/ext/sparsehash-1.5.2/configure +8054 -0
  21. data/ext/sparsehash-1.5.2/configure.ac +74 -0
  22. data/ext/sparsehash-1.5.2/depcomp +530 -0
  23. data/ext/sparsehash-1.5.2/doc/dense_hash_map.html +1591 -0
  24. data/ext/sparsehash-1.5.2/doc/dense_hash_set.html +1445 -0
  25. data/ext/sparsehash-1.5.2/doc/designstyle.css +115 -0
  26. data/ext/sparsehash-1.5.2/doc/implementation.html +365 -0
  27. data/ext/sparsehash-1.5.2/doc/index.html +69 -0
  28. data/ext/sparsehash-1.5.2/doc/performance.html +96 -0
  29. data/ext/sparsehash-1.5.2/doc/sparse_hash_map.html +1527 -0
  30. data/ext/sparsehash-1.5.2/doc/sparse_hash_set.html +1376 -0
  31. data/ext/sparsehash-1.5.2/doc/sparsetable.html +1393 -0
  32. data/ext/sparsehash-1.5.2/experimental/Makefile +9 -0
  33. data/ext/sparsehash-1.5.2/experimental/README +14 -0
  34. data/ext/sparsehash-1.5.2/experimental/example.c +54 -0
  35. data/ext/sparsehash-1.5.2/experimental/libchash.c +1537 -0
  36. data/ext/sparsehash-1.5.2/experimental/libchash.h +252 -0
  37. data/ext/sparsehash-1.5.2/google-sparsehash.sln +47 -0
  38. data/ext/sparsehash-1.5.2/install-sh +323 -0
  39. data/ext/sparsehash-1.5.2/m4/acx_pthread.m4 +363 -0
  40. data/ext/sparsehash-1.5.2/m4/google_namespace.m4 +42 -0
  41. data/ext/sparsehash-1.5.2/m4/namespaces.m4 +15 -0
  42. data/ext/sparsehash-1.5.2/m4/stl_hash.m4 +70 -0
  43. data/ext/sparsehash-1.5.2/m4/stl_hash_fun.m4 +36 -0
  44. data/ext/sparsehash-1.5.2/m4/stl_namespace.m4 +25 -0
  45. data/ext/sparsehash-1.5.2/missing +360 -0
  46. data/ext/sparsehash-1.5.2/mkinstalldirs +158 -0
  47. data/ext/sparsehash-1.5.2/packages/deb.sh +74 -0
  48. data/ext/sparsehash-1.5.2/packages/deb/README +7 -0
  49. data/ext/sparsehash-1.5.2/packages/deb/changelog +107 -0
  50. data/ext/sparsehash-1.5.2/packages/deb/compat +1 -0
  51. data/ext/sparsehash-1.5.2/packages/deb/control +17 -0
  52. data/ext/sparsehash-1.5.2/packages/deb/copyright +35 -0
  53. data/ext/sparsehash-1.5.2/packages/deb/docs +16 -0
  54. data/ext/sparsehash-1.5.2/packages/deb/rules +117 -0
  55. data/ext/sparsehash-1.5.2/packages/deb/sparsehash.dirs +2 -0
  56. data/ext/sparsehash-1.5.2/packages/deb/sparsehash.install +2 -0
  57. data/ext/sparsehash-1.5.2/packages/rpm.sh +86 -0
  58. data/ext/sparsehash-1.5.2/packages/rpm/rpm.spec +61 -0
  59. data/ext/sparsehash-1.5.2/src/config.h.in +131 -0
  60. data/ext/sparsehash-1.5.2/src/config.h.include +23 -0
  61. data/ext/sparsehash-1.5.2/src/google/dense_hash_map +310 -0
  62. data/ext/sparsehash-1.5.2/src/google/dense_hash_set +287 -0
  63. data/ext/sparsehash-1.5.2/src/google/sparse_hash_map +294 -0
  64. data/ext/sparsehash-1.5.2/src/google/sparse_hash_set +275 -0
  65. data/ext/sparsehash-1.5.2/src/google/sparsehash/densehashtable.h +1062 -0
  66. data/ext/sparsehash-1.5.2/src/google/sparsehash/sparsehashtable.h +1015 -0
  67. data/ext/sparsehash-1.5.2/src/google/sparsetable +1468 -0
  68. data/ext/sparsehash-1.5.2/src/google/type_traits.h +250 -0
  69. data/ext/sparsehash-1.5.2/src/hashtable_unittest.cc +1375 -0
  70. data/ext/sparsehash-1.5.2/src/simple_test.cc +103 -0
  71. data/ext/sparsehash-1.5.2/src/sparsetable_unittest.cc +696 -0
  72. data/ext/sparsehash-1.5.2/src/time_hash_map.cc +488 -0
  73. data/ext/sparsehash-1.5.2/src/type_traits_unittest.cc +492 -0
  74. data/ext/sparsehash-1.5.2/src/windows/config.h +149 -0
  75. data/ext/sparsehash-1.5.2/src/windows/google/sparsehash/sparseconfig.h +32 -0
  76. data/ext/sparsehash-1.5.2/src/windows/port.cc +63 -0
  77. data/ext/sparsehash-1.5.2/src/windows/port.h +81 -0
  78. data/ext/sparsehash-1.5.2/src/words +8944 -0
  79. data/ext/sparsehash-1.5.2/vsprojects/hashtable_unittest/hashtable_unittest.vcproj +187 -0
  80. data/ext/sparsehash-1.5.2/vsprojects/sparsetable_unittest/sparsetable_unittest.vcproj +172 -0
  81. data/ext/sparsehash-1.5.2/vsprojects/time_hash_map/time_hash_map.vcproj +187 -0
  82. data/ext/sparsehash-1.5.2/vsprojects/type_traits_unittest/type_traits_unittest.vcproj +169 -0
  83. data/ext/test.rb +10 -0
  84. data/test/spec.go +70 -0
  85. metadata +147 -0
@@ -0,0 +1,169 @@
1
+ <?xml version="1.0" encoding="Windows-1252"?>
2
+ <VisualStudioProject
3
+ ProjectType="Visual C++"
4
+ Version="7.10"
5
+ Name="type_traits_unittest"
6
+ ProjectGUID="{008CCFED-7D7B-46F8-8E13-03837A2258B3}"
7
+ Keyword="Win32Proj">
8
+ <Platforms>
9
+ <Platform
10
+ Name="Win32"/>
11
+ </Platforms>
12
+ <Configurations>
13
+ <Configuration
14
+ Name="Debug|Win32"
15
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
16
+ IntermediateDirectory="$(ConfigurationName)"
17
+ ConfigurationType="1"
18
+ CharacterSet="2">
19
+ <Tool
20
+ Name="VCCLCompilerTool"
21
+ Optimization="0"
22
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
23
+ MinimalRebuild="TRUE"
24
+ BasicRuntimeChecks="3"
25
+ RuntimeLibrary="5"
26
+ UsePrecompiledHeader="0"
27
+ WarningLevel="3"
28
+ Detect64BitPortabilityProblems="TRUE"
29
+ DebugInformationFormat="4"/>
30
+ <Tool
31
+ Name="VCCustomBuildTool"/>
32
+ <Tool
33
+ Name="VCLinkerTool"
34
+ OutputFile="$(OutDir)/type_traits_unittest.exe"
35
+ LinkIncremental="2"
36
+ GenerateDebugInformation="TRUE"
37
+ ProgramDatabaseFile="$(OutDir)/type_traits_unittest.pdb"
38
+ SubSystem="1"
39
+ TargetMachine="1"/>
40
+ <Tool
41
+ Name="VCMIDLTool"/>
42
+ <Tool
43
+ Name="VCPostBuildEventTool"/>
44
+ <Tool
45
+ Name="VCPreBuildEventTool"/>
46
+ <Tool
47
+ Name="VCPreLinkEventTool"/>
48
+ <Tool
49
+ Name="VCResourceCompilerTool"/>
50
+ <Tool
51
+ Name="VCWebServiceProxyGeneratorTool"/>
52
+ <Tool
53
+ Name="VCXMLDataGeneratorTool"/>
54
+ <Tool
55
+ Name="VCWebDeploymentTool"/>
56
+ <Tool
57
+ Name="VCManagedWrapperGeneratorTool"/>
58
+ <Tool
59
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
60
+ </Configuration>
61
+ <Configuration
62
+ Name="Release|Win32"
63
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
64
+ IntermediateDirectory="$(ConfigurationName)"
65
+ ConfigurationType="1"
66
+ CharacterSet="2">
67
+ <Tool
68
+ Name="VCCLCompilerTool"
69
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
70
+ RuntimeLibrary="4"
71
+ UsePrecompiledHeader="0"
72
+ WarningLevel="3"
73
+ Detect64BitPortabilityProblems="TRUE"
74
+ DebugInformationFormat="3"/>
75
+ <Tool
76
+ Name="VCCustomBuildTool"/>
77
+ <Tool
78
+ Name="VCLinkerTool"
79
+ OutputFile="$(OutDir)/type_traits_unittest.exe"
80
+ LinkIncremental="1"
81
+ GenerateDebugInformation="TRUE"
82
+ SubSystem="1"
83
+ OptimizeReferences="2"
84
+ EnableCOMDATFolding="2"
85
+ TargetMachine="1"/>
86
+ <Tool
87
+ Name="VCMIDLTool"/>
88
+ <Tool
89
+ Name="VCPostBuildEventTool"/>
90
+ <Tool
91
+ Name="VCPreBuildEventTool"/>
92
+ <Tool
93
+ Name="VCPreLinkEventTool"/>
94
+ <Tool
95
+ Name="VCResourceCompilerTool"/>
96
+ <Tool
97
+ Name="VCWebServiceProxyGeneratorTool"/>
98
+ <Tool
99
+ Name="VCXMLDataGeneratorTool"/>
100
+ <Tool
101
+ Name="VCWebDeploymentTool"/>
102
+ <Tool
103
+ Name="VCManagedWrapperGeneratorTool"/>
104
+ <Tool
105
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
106
+ </Configuration>
107
+ </Configurations>
108
+ <References>
109
+ </References>
110
+ <Files>
111
+ <Filter
112
+ Name="Source Files"
113
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
114
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
115
+ <File
116
+ RelativePath="..\..\src\windows\port.cc">
117
+ <FileConfiguration
118
+ Name="Debug|Win32">
119
+ <Tool
120
+ Name="VCCLCompilerTool"
121
+ AdditionalIncludeDirectories="..\..\src\windows; ..\..\src"/>
122
+ </FileConfiguration>
123
+ <FileConfiguration
124
+ Name="Release|Win32">
125
+ <Tool
126
+ Name="VCCLCompilerTool"
127
+ AdditionalIncludeDirectories="..\..\src\windows; ..\..\src"/>
128
+ </FileConfiguration>
129
+ </File>
130
+ <File
131
+ RelativePath="..\..\src\type_traits_unittest.cc">
132
+ <FileConfiguration
133
+ Name="Debug|Win32">
134
+ <Tool
135
+ Name="VCCLCompilerTool"
136
+ AdditionalIncludeDirectories="..\..\src\windows; ..\..\src"/>
137
+ </FileConfiguration>
138
+ <FileConfiguration
139
+ Name="Release|Win32">
140
+ <Tool
141
+ Name="VCCLCompilerTool"
142
+ AdditionalIncludeDirectories="..\..\src\windows; ..\..\src"/>
143
+ </FileConfiguration>
144
+ </File>
145
+ </Filter>
146
+ <Filter
147
+ Name="Header Files"
148
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
149
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
150
+ <File
151
+ RelativePath="..\..\src\windows\config.h">
152
+ </File>
153
+ <File
154
+ RelativePath="..\..\src\windows\port.h">
155
+ </File>
156
+ <File
157
+ RelativePath="..\..\src\windows\google\sparsehash\sparseconfig.h">
158
+ </File>
159
+ <File
160
+ RelativePath="..\..\src\google\sparsetable">
161
+ </File>
162
+ <File
163
+ RelativePath="..\..\src\google\type_traits.h">
164
+ </File>
165
+ </Filter>
166
+ </Files>
167
+ <Globals>
168
+ </Globals>
169
+ </VisualStudioProject>
@@ -0,0 +1,10 @@
1
+ require 'google_hash'
2
+ a = GoogleHashSmall.new
3
+ puts
4
+ a[3] = 4
5
+
6
+ require 'benchmark'
7
+ b = {}
8
+ puts Benchmark.realtime { 1000.times { 1000.times {|n| b[n] = 4}}}
9
+ puts Benchmark.realtime { 1000.times { 1000.times {|n| a[n] = 4}}}
10
+
@@ -0,0 +1,70 @@
1
+ require 'sane'
2
+ require_rel '../ext/google_hash.so'
3
+ require 'spec/autorun'
4
+
5
+ describe GoogleHashSmall do
6
+
7
+ before do
8
+ @subject = GoogleHashSmall.new
9
+ end
10
+
11
+ it "should be instantiable" do
12
+ # nothing
13
+ end
14
+
15
+ it "should allow you to set a key" do
16
+ @subject[33] = 'abc'
17
+ end
18
+
19
+ it "should allow you to retrieve a key" do
20
+ @subject[33] = 'abc'
21
+ @subject[33].should == 'abc'
22
+ end
23
+
24
+ it "should allow you to iterate" do
25
+ @subject[33] = 'abc'
26
+ @subject[44] = 'def'
27
+ all_got = []
28
+ @subject.each{|k, v|
29
+ all_got << v
30
+ }
31
+ assert all_got.sort == ['abc', 'def']
32
+ end
33
+
34
+ it "should have all the methods desired" do
35
+ # guess these could all be tests, themselves...
36
+ @subject.each_key {}
37
+ @subject.each_value{}
38
+ @subject.each{}
39
+ @subject.delete(33)
40
+ @subject.clear
41
+ @subject.length.should == 0
42
+ end
43
+
44
+ it "should not leak" do
45
+ raise 'not done'
46
+ end
47
+
48
+ it "should have better namespace" do
49
+ GoogleHash::Space
50
+ end
51
+
52
+ it "should disallow non numeric keys" do
53
+ @subject['33'].should raise_exception
54
+ end
55
+
56
+ it "should allow for non numeric keys" do
57
+ # todo instantiate new type here...
58
+ # todo allow for floats, ints, symbols, strings [freeze 'em]
59
+ # wait are any of those actually useful tho?
60
+ @subject['33'] = 33
61
+ @subject['33'].should == 33
62
+ end
63
+
64
+ # todo do the non sparse, too...
65
+
66
+ it "should return nil if key is absent" do
67
+ @subject[33].should be_nil
68
+ end
69
+
70
+ end
metadata ADDED
@@ -0,0 +1,147 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: google_hash
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - rogerdpack
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-12-15 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: sane
17
+ type: :development
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0"
24
+ version:
25
+ description: A different and possibly longer explanation of
26
+ email: rogerdpack@gmail.com
27
+ executables: []
28
+
29
+ extensions:
30
+ - ext/extconf.rb
31
+ extra_rdoc_files:
32
+ - README
33
+ files:
34
+ - README
35
+ - Rakefile
36
+ - VERSION
37
+ - ext/extconf.rb
38
+ - ext/go.cpp
39
+ - ext/sparsehash-1.5.2/AUTHORS
40
+ - ext/sparsehash-1.5.2/COPYING
41
+ - ext/sparsehash-1.5.2/ChangeLog
42
+ - ext/sparsehash-1.5.2/INSTALL
43
+ - ext/sparsehash-1.5.2/Makefile.am
44
+ - ext/sparsehash-1.5.2/Makefile.in
45
+ - ext/sparsehash-1.5.2/NEWS
46
+ - ext/sparsehash-1.5.2/README
47
+ - ext/sparsehash-1.5.2/README.windows
48
+ - ext/sparsehash-1.5.2/TODO
49
+ - ext/sparsehash-1.5.2/aclocal.m4
50
+ - ext/sparsehash-1.5.2/compile
51
+ - ext/sparsehash-1.5.2/config.guess
52
+ - ext/sparsehash-1.5.2/config.sub
53
+ - ext/sparsehash-1.5.2/configure
54
+ - ext/sparsehash-1.5.2/configure.ac
55
+ - ext/sparsehash-1.5.2/depcomp
56
+ - ext/sparsehash-1.5.2/doc/dense_hash_map.html
57
+ - ext/sparsehash-1.5.2/doc/dense_hash_set.html
58
+ - ext/sparsehash-1.5.2/doc/designstyle.css
59
+ - ext/sparsehash-1.5.2/doc/implementation.html
60
+ - ext/sparsehash-1.5.2/doc/index.html
61
+ - ext/sparsehash-1.5.2/doc/performance.html
62
+ - ext/sparsehash-1.5.2/doc/sparse_hash_map.html
63
+ - ext/sparsehash-1.5.2/doc/sparse_hash_set.html
64
+ - ext/sparsehash-1.5.2/doc/sparsetable.html
65
+ - ext/sparsehash-1.5.2/experimental/Makefile
66
+ - ext/sparsehash-1.5.2/experimental/README
67
+ - ext/sparsehash-1.5.2/experimental/example.c
68
+ - ext/sparsehash-1.5.2/experimental/libchash.c
69
+ - ext/sparsehash-1.5.2/experimental/libchash.h
70
+ - ext/sparsehash-1.5.2/google-sparsehash.sln
71
+ - ext/sparsehash-1.5.2/install-sh
72
+ - ext/sparsehash-1.5.2/m4/acx_pthread.m4
73
+ - ext/sparsehash-1.5.2/m4/google_namespace.m4
74
+ - ext/sparsehash-1.5.2/m4/namespaces.m4
75
+ - ext/sparsehash-1.5.2/m4/stl_hash.m4
76
+ - ext/sparsehash-1.5.2/m4/stl_hash_fun.m4
77
+ - ext/sparsehash-1.5.2/m4/stl_namespace.m4
78
+ - ext/sparsehash-1.5.2/missing
79
+ - ext/sparsehash-1.5.2/mkinstalldirs
80
+ - ext/sparsehash-1.5.2/packages/deb.sh
81
+ - ext/sparsehash-1.5.2/packages/deb/README
82
+ - ext/sparsehash-1.5.2/packages/deb/changelog
83
+ - ext/sparsehash-1.5.2/packages/deb/compat
84
+ - ext/sparsehash-1.5.2/packages/deb/control
85
+ - ext/sparsehash-1.5.2/packages/deb/copyright
86
+ - ext/sparsehash-1.5.2/packages/deb/docs
87
+ - ext/sparsehash-1.5.2/packages/deb/rules
88
+ - ext/sparsehash-1.5.2/packages/deb/sparsehash.dirs
89
+ - ext/sparsehash-1.5.2/packages/deb/sparsehash.install
90
+ - ext/sparsehash-1.5.2/packages/rpm.sh
91
+ - ext/sparsehash-1.5.2/packages/rpm/rpm.spec
92
+ - ext/sparsehash-1.5.2/src/config.h.in
93
+ - ext/sparsehash-1.5.2/src/config.h.include
94
+ - ext/sparsehash-1.5.2/src/google/dense_hash_map
95
+ - ext/sparsehash-1.5.2/src/google/dense_hash_set
96
+ - ext/sparsehash-1.5.2/src/google/sparse_hash_map
97
+ - ext/sparsehash-1.5.2/src/google/sparse_hash_set
98
+ - ext/sparsehash-1.5.2/src/google/sparsehash/densehashtable.h
99
+ - ext/sparsehash-1.5.2/src/google/sparsehash/sparsehashtable.h
100
+ - ext/sparsehash-1.5.2/src/google/sparsetable
101
+ - ext/sparsehash-1.5.2/src/google/type_traits.h
102
+ - ext/sparsehash-1.5.2/src/hashtable_unittest.cc
103
+ - ext/sparsehash-1.5.2/src/simple_test.cc
104
+ - ext/sparsehash-1.5.2/src/sparsetable_unittest.cc
105
+ - ext/sparsehash-1.5.2/src/time_hash_map.cc
106
+ - ext/sparsehash-1.5.2/src/type_traits_unittest.cc
107
+ - ext/sparsehash-1.5.2/src/windows/config.h
108
+ - ext/sparsehash-1.5.2/src/windows/google/sparsehash/sparseconfig.h
109
+ - ext/sparsehash-1.5.2/src/windows/port.cc
110
+ - ext/sparsehash-1.5.2/src/windows/port.h
111
+ - ext/sparsehash-1.5.2/src/words
112
+ - ext/sparsehash-1.5.2/vsprojects/hashtable_unittest/hashtable_unittest.vcproj
113
+ - ext/sparsehash-1.5.2/vsprojects/sparsetable_unittest/sparsetable_unittest.vcproj
114
+ - ext/sparsehash-1.5.2/vsprojects/time_hash_map/time_hash_map.vcproj
115
+ - ext/sparsehash-1.5.2/vsprojects/type_traits_unittest/type_traits_unittest.vcproj
116
+ - ext/test.rb
117
+ - test/spec.go
118
+ has_rdoc: true
119
+ homepage: http://github.com/rdp/ruby_google_hash
120
+ licenses: []
121
+
122
+ post_install_message:
123
+ rdoc_options:
124
+ - --charset=UTF-8
125
+ require_paths:
126
+ - lib
127
+ required_ruby_version: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: "0"
132
+ version:
133
+ required_rubygems_version: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ version: "0"
138
+ version:
139
+ requirements: []
140
+
141
+ rubyforge_project:
142
+ rubygems_version: 1.3.5
143
+ signing_key:
144
+ specification_version: 3
145
+ summary: Ruby wrappers to the google hash library
146
+ test_files: []
147
+