rails_sql_prettifier 7.0.5 → 7.0.6

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.
data/lib/benchmark/cat.rb DELETED
@@ -1,34 +0,0 @@
1
- require 'benchmark/ips'
2
-
3
- # 2 + 1 = 3 object
4
- def slow_plus
5
- 'foo' + 'bar'
6
- end
7
-
8
- # 2 + 1 = 3 object
9
- def slow_concat
10
- 'foo'.concat 'bar'
11
- end
12
-
13
- # 2 + 1 = 3 object
14
- def slow_append
15
- 'foo' << 'bar'
16
- end
17
-
18
- # 1 object
19
- def fast
20
- 'foo' 'bar'
21
- end
22
-
23
- def fast_interpolation
24
- "#{'foo'}#{'bar'}"
25
- end
26
-
27
- Benchmark.ips do |x|
28
- x.report('String#+') { slow_plus }
29
- x.report('String#concat') { slow_concat }
30
- x.report('String#append') { slow_append }
31
- x.report('"foo" "bar"') { fast }
32
- x.report('"#{\'foo\'}#{\'bar\'}"') { fast_interpolation }
33
- x.compare!
34
- end
@@ -1,34 +0,0 @@
1
- require 'benchmark/ips'
2
-
3
- # 2 + 1 = 3 object
4
- def slow_plus
5
- 'foo' + 'bar'
6
- end
7
-
8
- # 2 + 1 = 3 object
9
- def slow_concat
10
- 'foo'.concat 'bar'
11
- end
12
-
13
- # 2 + 1 = 3 object
14
- def slow_append
15
- 'foo' << 'bar'
16
- end
17
-
18
- # 1 object
19
- def fast
20
- 'foo' 'bar'
21
- end
22
-
23
- def fast_interpolation
24
- "#{'foo'}#{'bar'}"
25
- end
26
-
27
- Benchmark.ips do |x|
28
- x.report('String#+') { slow_plus }
29
- x.report('String#concat') { slow_concat }
30
- x.report('String#append') { slow_append }
31
- x.report('"foo" "bar"') { fast }
32
- x.report('"#{\'foo\'}#{\'bar\'}"') { fast_interpolation }
33
- x.compare!
34
- end