This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'benchmark' | |
require 'benchmark/ips' | |
small_file = File.join(File.dirname(__FILE__), 'small.txt') | |
medium_file = File.join(File.dirname(__FILE__), 'medium.txt') | |
large_file = File.join(File.dirname(__FILE__), 'large.txt') | |
# Open these before the actual benchmarks so we don't also benchmark | |
# File.open(). | |
small_handle = File.open(small_file, 'r') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cremes$ ./bin/benchmark core/file/bench_seek.rb | |
=== rbx === | |
seek through a small file randomly (SEEK_SET) | |
4115.1 (±4.2%) i/s - 20650 in 5.028761s (cycle=350) | |
seek through a medium file randomly (SEEK_SET) | |
4236.1 (±1.6%) i/s - 21372 in 5.046543s (cycle=411) | |
seek through a large file randomly (SEEK_SET) | |
4257.4 (±1.0%) i/s - 21320 in 5.008270s (cycle=410) | |
seek through a small file randomly (SEEK_CUR) | |
2124.6 (±4.0%) i/s - 10764 in 5.076670s (cycle=207) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
'the instrument class | |
Public pName As String | |
Public pDateAdded As Date | |
Public pSide As String | |
Property Get Name() As String | |
'return the instrument's name | |
Name = pName | |
End Property | |
Property Let Name(n As String) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LLVM ERROR: Cannot select: 0x7fa2428da810: i8 = brcond 0x7fa2428db510, 0x7fa2428e0f10, 0x7fa2428e0010 [ID=75] dbg:kernel/common/string.rb:2492 | |
0x7fa2428db510: i8 = TokenFactor 0x7fa2428da010, 0x7fa242845410:1 [ID=74] dbg:kernel/common/string.rb:2492 | |
0x7fa2428da010: i8 = CopyToReg 0x7fa242411ab0, 0x7fa2428ee610, 0x7fa242845410 [ID=72] dbg:kernel/common/string.rb:2492 | |
0x7fa242411ab0: i8 = EntryToken [ORD=1107] [ID=0] | |
0x7fa2428ee610: f16 = Register %vreg75 [ID=26] | |
0x7fa242845410: i64,ch,glue = CopyFromReg 0x7fa242844a10, 0x7fa2428dfa10, 0x7fa242844a10:1 [ORD=1143] [ID=70] dbg:kernel/common/string.rb:2492 | |
0x7fa2428dfa10: f16 = Register %RAX [ORD=1143] [ID=25] | |
0x7fa242844a10: ch,glue = callseq_end 0x7fa2428e1610, 0x7fa2428d9f10, 0x7fa2428d9f10, 0x7fa2428e1610:1 [ORD=1143] [ID=69] | |
0x7fa2428d9f10: f16 = TargetConstant<0> [ORD=1143] [ID=19] | |
0x7fa2428d9f10: f16 = TargetConstant<0> [ORD=1143] [ID=19] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2015-01-16 12:05:24] Configuring Rubinius... | |
[2015-01-16 12:05:24] Command line: "" | |
[2015-01-16 12:05:24] Checking gcc: | |
[2015-01-16 12:05:24] found | |
[2015-01-16 12:05:24] Checking g++: | |
[2015-01-16 12:05:24] found | |
[2015-01-16 12:05:24] Checking bison: | |
[2015-01-16 12:05:24] found | |
[2015-01-16 12:05:24] --- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When running this spec, I get an encoding compatibility error: | |
https://github.com/rubinius/rubinius/blob/master/spec/ruby/core/io/gets_spec.rb#L280 | |
results in: | |
1) | |
IO#gets transcodes into the IO object's internal encoding, when set ERROR | |
Encoding::CompatibilityError: undefined conversion for '"\u00FE\u00FF\u0000l\u0000i\u0000n\u0000e"' from UTF-16 to UTF-8 | |
Rubinius::Type.compatible_encoding at kernel/common/type.rb:533 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Charless-Mac-Pro:rubinius cremes$ git pull --rebase origin master | |
From github.com:rubinius/rubinius | |
* branch master -> FETCH_HEAD | |
First, rewinding head to replay your work on top of it... | |
Applying: add basic support for additional IO functions | |
Applying: add back dup2 function definition | |
Applying: add convenience methods for errno handling | |
Applying: add O_CLOEXEC to list for File IO | |
Applying: add a few more functions like ftruncate to the list | |
Applying: hack away and rejigger things to get IO booting using mostly FFI calls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FDSet* FDSet::allocate(STATE) { | |
FDSet* fdset = state->new_object<FDSet>(G(fdset)); | |
// | |
// fdset->klass(state, as<Class>(self)); | |
// | |
return fdset; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Charless-MacBook-Air:rubinius cremes$ ruby -S rake build | |
/Users/cremes/.rubies/ruby-2.1.4/bin/ruby vm/codegen/field_extract.rb vm/builtin/basic_object.hpp vm/builtin/object.hpp vm/builtin/integer.hpp vm/builtin/fixnum.hpp vm/builtin/array.hpp vm/builtin/bignum.hpp vm/builtin/executable.hpp vm/builtin/access_variable.hpp vm/builtin/alias.hpp vm/builtin/block_environment.hpp vm/builtin/block_as_method.hpp vm/builtin/byte_array.hpp vm/builtin/io.hpp vm/builtin/channel.hpp vm/builtin/module.hpp vm/builtin/constant_table.hpp vm/builtin/class.hpp vm/builtin/compiled_code.hpp vm/builtin/data.hpp vm/builtin/dir.hpp vm/builtin/exception.hpp vm/builtin/float.hpp vm/builtin/fsevent.hpp vm/builtin/immediates.hpp vm/builtin/iseq.hpp vm/builtin/list.hpp vm/builtin/logger.hpp vm/builtin/lookup_table.hpp vm/builtin/ffi_pointer.hpp vm/builtin/method_table.hpp vm/builtin/native_function.hpp vm/builtin/packed_object.hpp vm/builtin/randomizer.hpp vm/builtin/regexp.hpp vm/builtin/constant_scope.hpp vm/builtin/encoding.hpp vm/buil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Assertion failed: (pos >= 0 && pos < vmm_->stack_size), function stack_position, file vm/llvm/jit_operations.hpp, line 328. | |
Abort trap | |