You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 72bae11
Browse filesBrowse the repository at this point in the historyBrowse files
Ruby 4.0.0 shows a slight improvement over Ruby 3.4.8, but the difference is not significant using thread.
26
+
Ractor could be considered for a more efficient use of resources but it's still in the experimental stage.
27
+
28
+
Note: in this benchmark, `thread == HTTP connections`.
29
+
30
+
### Key Takeaways
31
+
32
+
1.**Upgrade to Ruby 3.4.4**: Clear performance benefits across all scenarios
33
+
2.**Use Persistent Connections**: 2x+ performance improvement in most cases
34
+
3.**HTTP.rb Performance**: Particularly benefits from Ruby 3.4.4 with persistent connections
35
+
4.**SerpApi Optimization**: Shows consistent ~2.2x improvement with persistent connections regardless of Ruby version
36
+
5.**Ruby 4.0.0 Performance**: Shows mixed results with some regressions compared to 3.4.4, particularly for HTTP.rb persistent connections. Ruby 4.0.0 was just released for Christmas 2025, and HTTP.rb has not been optimized for it yet.
37
+
38
+
The older library (google-search-results-ruby) was performing at 55 req/s on Ruby 2.7.8, which is 2x slower than the current version (serpapi-ruby) on Ruby 3.4.4 or 4.0.0.
39
+
40
+
**Context** This benchmark was performed on warmup search results using a MacBook Pro 2025 connected via Wi-Fi 6.0 home network on AT&T fiber from Austin, TX (no network optimization).
Copy file name to clipboardExpand all lines: README.md
+10-47Lines changed: 10 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,22 +16,23 @@ Query a vast range of data at scale, including web search results, flight schedu
16
16
17
17
## Installation
18
18
19
-
Ruby 2.7 and higher are supported. To achieve an optimal performance, the latest version is recommended. Check 2.7.8 vs 3.4.4 [performance comparison](#Performance-Comparison).
19
+
### RubyGems
20
20
21
-
Other versions, such as Ruby 1.9, Ruby 2.x, and JRuby, are compatible with [legacy SerpApi library](https://github.com/serpapi/google-search-results-ruby), which is still supported. To upgrade to the latest library, check our [migration guide](#Migration-quick-guide).
Ruby 2.7 and higher are supported. Other versions, such as Ruby 1.9, Ruby 2.x, and JRuby, are compatible with [legacy SerpApi library](https://github.com/serpapi/google-search-results-ruby), which is still supported. To upgrade to the latest library, check our [migration guide](#Migration-quick-guide).
1.**Upgrade to Ruby 3.4.4**: Clear performance benefits across all scenarios
1025
-
2.**Use Persistent Connections**: 2x+ performance improvement in most cases
1026
-
3.**HTTP.rb Performance**: Particularly benefits from Ruby 3.4.4 with persistent connections
1027
-
4.**SerpApi Optimization**: Shows consistent ~2.2x improvement with persistent connections regardless of Ruby version
1028
-
5.**Ruby 4.0.0 Performance**: Shows mixed results with some regressions compared to 3.4.4, particularly for HTTP.rb persistent connections. Ruby 4.0.0 was just released for Christmas 2025, and HTTP.rb has not been optimized for it yet.
1029
-
1030
-
The older library (google-search-results-ruby) was performing at 55 req/s on Ruby 2.7.8, which is 2x slower than the current version (serpapi-ruby) on Ruby 3.4.4 or 4.0.0.
1031
-
1032
-
**Context** This benchmark was performed on warmup search results using a MacBook Pro 2025 connected via Wi-Fi 6.0 home network on AT&T fiber from Austin, TX (no network optimization).
1033
-
1034
997
## Migration quick guide
1035
998
1036
999
If you were already using [google-search-results-ruby gem](https://github.com/serpapi/google-search-results-ruby), here are the changes.
Copy file name to clipboardExpand all lines: README.md.erb
+10-46Lines changed: 10 additions & 46 deletions
Original file line number
Diff line number
Diff line change
@@ -36,22 +36,23 @@ Query a vast range of data at scale, including web search results, flight schedu
36
36
37
37
## Installation
38
38
39
-
Ruby 2.7 and higher are supported. To achieve an optimal performance, the latest version is recommended. Check 2.7.8 vs 3.4.4 [performance comparison](#Performance-Comparison).
39
+
### RubyGems
40
40
41
-
Other versions, such as Ruby 1.9, Ruby 2.x, and JRuby, are compatible with [legacy SerpApi library](https://github.com/serpapi/google-search-results-ruby), which is still supported. To upgrade to the latest library, check our [migration guide](#Migration-quick-guide).
Ruby 2.7 and higher are supported. Other versions, such as Ruby 1.9, Ruby 2.x, and JRuby, are compatible with [legacy SerpApi library](https://github.com/serpapi/google-search-results-ruby), which is still supported. To upgrade to the latest library, check our [migration guide](#Migration-quick-guide).
1. **Upgrade to Ruby 3.4.4**: Clear performance benefits across all scenarios
506
-
2. **Use Persistent Connections**: 2x+ performance improvement in most cases
507
-
3. **HTTP.rb Performance**: Particularly benefits from Ruby 3.4.4 with persistent connections
508
-
4. **SerpApi Optimization**: Shows consistent ~2.2x improvement with persistent connections regardless of Ruby version
509
-
5. **Ruby 4.0.0 Performance**: Shows mixed results with some regressions compared to 3.4.4, particularly for HTTP.rb persistent connections. Ruby 4.0.0 was just released for Christmas 2025, and HTTP.rb has not been optimized for it yet.
510
-
511
-
The older library (google-search-results-ruby) was performing at 55 req/s on Ruby 2.7.8, which is 2x slower than the current version (serpapi-ruby) on Ruby 3.4.4 or 4.0.0.
512
-
513
-
**Context** This benchmark was performed on warmup search results using a MacBook Pro 2025 connected via Wi-Fi 6.0 home network on AT&T fiber from Austin, TX (no network optimization).
0 commit comments