Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.13
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
ruby-concurrent /
examples /
[ HOME SHELL ]
Name
Size
Permission
Action
a-tour-of-go-channels
[ DIR ]
drwxr-xr-x
go-by-example-channels
[ DIR ]
drwxr-xr-x
actor_stress_test.rb
3.23
KB
-rwxr-xr-x
atomic_example.rb
392
B
-rwxr-xr-x
benchmark_async.rb
6.81
KB
-rwxr-xr-x
benchmark_atomic.rb
2.53
KB
-rwxr-xr-x
benchmark_atomic_1.rb
2.52
KB
-rwxr-xr-x
benchmark_atomic_boolean.rb
984
B
-rwxr-xr-x
benchmark_atomic_fixnum.rb
964
B
-rwxr-xr-x
benchmark_map.rb
581
B
-rwxr-xr-x
benchmark_new_futures.rb
2.16
KB
-rwxr-xr-x
benchmark_read_write_lock.rb
4.27
KB
-rwxr-xr-x
benchmark_structs.rb
4.66
KB
-rwxr-xr-x
format.rb
1.86
KB
-rw-r--r--
graph_atomic_bench.rb
1.73
KB
-rwxr-xr-x
init.rb
104
B
-rw-r--r--
stress_ruby_thread_pool.rb
791
B
-rwxr-xr-x
thread_local_memory_usage.rb
1.61
KB
-rwxr-xr-x
thread_local_var_bench.rb
606
B
-rwxr-xr-x
who.rb
711
B
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : benchmark_structs.rb
#!/usr/bin/env ruby #$: << File.expand_path('../../lib', __FILE__) require 'benchmark' require 'concurrent' n = 500_000 StructPair = Struct.new(:left, :right) SafePair = Concurrent::MutableStruct.new(:left, :right) FinalPair = Concurrent::SettableStruct.new(:left, :right) ImmutablePair = Concurrent::ImmutableStruct.new(:left, :right) array_pair = [true, false].freeze struct_pair = StructPair.new(true, false) safe_pair = SafePair.new(true, false) final_pair = FinalPair.new(true, false) immutable = ImmutablePair.new(true, false) puts "Object creation...\n" Benchmark.bmbm do |x| x.report('create frozen array') { n.times{ [true, false].freeze } } x.report('create frozen struct') { n.times{ StructPair.new(true, false).freeze } } x.report('create mutable struct') { n.times{ SafePair.new(true, false) } } x.report('create settable struct') { n.times{ FinalPair.new(true, false) } } x.report('create immutable struct') { n.times{ ImmutablePair.new(true, false) } } end puts "\n" puts "Object access...\n" Benchmark.bmbm do |x| x.report('read from frozen array') { n.times{ array_pair.last } } x.report('read from frozen struct') { n.times{ struct_pair.right } } x.report('read from mutable struct') { n.times{ safe_pair.right } } x.report('read from settable struct') { n.times{ final_pair.right } } x.report('read from immutable struct') { n.times{ immutable.right } } end puts "\n" puts "Enumeration...\n" Benchmark.bmbm do |x| x.report('iterate over frozen array') { n.times{ array_pair.each{ nil } } } x.report('iterate over frozen struct') { n.times{ struct_pair.each{ nil } } } x.report('iterate over mutable struct') { n.times{ safe_pair.each{ nil } } } x.report('iterate over settable struct') { n.times{ final_pair.each{ nil } } } x.report('iterate over immutable struct') { n.times{ immutable.each{ nil } } } end __END__ Object creation... Rehearsal ----------------------------------------------------------- create frozen array 0.090000 0.000000 0.090000 ( 0.091262) create frozen struct 0.180000 0.000000 0.180000 ( 0.179993) create mutable struct 2.030000 0.000000 2.030000 ( 2.052071) create settable struct 2.070000 0.000000 2.070000 ( 2.080022) create immutable struct 0.710000 0.000000 0.710000 ( 0.716877) -------------------------------------------------- total: 5.080000sec user system total real create frozen array 0.100000 0.000000 0.100000 ( 0.097776) create frozen struct 0.190000 0.000000 0.190000 ( 0.186287) create mutable struct 2.020000 0.010000 2.030000 ( 2.032391) create settable struct 2.030000 0.000000 2.030000 ( 2.031631) create immutable struct 0.690000 0.000000 0.690000 ( 0.695010) Object access... Rehearsal -------------------------------------------------------------- read from frozen array 0.060000 0.000000 0.060000 ( 0.060430) read from frozen struct 0.060000 0.000000 0.060000 ( 0.058978) read from mutable struct 0.440000 0.000000 0.440000 ( 0.454071) read from settable struct 0.460000 0.000000 0.460000 ( 0.457699) read from immutable struct 0.120000 0.000000 0.120000 ( 0.126701) ----------------------------------------------------- total: 1.140000sec user system total real read from frozen array 0.060000 0.000000 0.060000 ( 0.063006) read from frozen struct 0.060000 0.000000 0.060000 ( 0.094203) read from mutable struct 0.420000 0.000000 0.420000 ( 0.468304) read from settable struct 0.410000 0.000000 0.410000 ( 0.452446) read from immutable struct 0.110000 0.010000 0.120000 ( 0.127030) Enumeration... Rehearsal ----------------------------------------------------------------- iterate over frozen array 0.170000 0.000000 0.170000 ( 0.176898) iterate over frozen struct 0.160000 0.000000 0.160000 ( 0.160786) iterate over mutable struct 1.520000 0.000000 1.520000 ( 1.627013) iterate over settable struct 1.500000 0.010000 1.510000 ( 1.525163) iterate over immutable struct 0.990000 0.000000 0.990000 ( 1.006201) -------------------------------------------------------- total: 4.350000sec user system total real iterate over frozen array 0.170000 0.000000 0.170000 ( 0.167927) iterate over frozen struct 0.150000 0.000000 0.150000 ( 0.157328) iterate over mutable struct 1.450000 0.000000 1.450000 ( 1.462654) iterate over settable struct 1.460000 0.000000 1.460000 ( 1.480270) iterate over immutable struct 0.940000 0.010000 0.950000 ( 0.955633)
Close