Marc-Andre Lafortune
26041da2fb
[flori/json] Typo fix
...
26c1769969
2020-07-01 18:47:51 +09:00
BurdetteLamar
d69b55ac05
[flori/json] Added :call-seq: to RDOc for some methods
...
ee5b6a74e9
2020-07-01 18:47:51 +09:00
Watson
cb3e62511c
[flori/json] Use frozen string for hash key
...
When use non-frozen string for hash key with `rb_hash_aset()`, it will duplicate and freeze it internally.
To avoid duplicate and freeze, this patch will give a frozen string in `rb_hash_aset()`.
```
Warming up --------------------------------------
json 14.000 i/100ms
Calculating -------------------------------------
json 148.844 (± 1.3%) i/s - 756.000 in 5.079969s
```
```
Warming up --------------------------------------
json 16.000 i/100ms
Calculating -------------------------------------
json 165.608 (± 1.8%) i/s - 832.000 in 5.025367s
```
```
require 'json'
require 'securerandom'
require 'benchmark/ips'
obj = []
1000.times do |i|
obj << {
"id": i,
"uuid": SecureRandom.uuid,
"created_at": Time.now
}
end
json = obj.to_json
Benchmark.ips do |x|
x.report "json" do |iter|
count = 0
while count < iter
JSON.parse(json)
count += 1
end
end
end
```
18292c0c1d
2020-07-01 18:47:51 +09:00
BurdetteLamar
7d8ce96de6
[flori/json] RDoc enhancements
...
ada48f0236
2020-07-01 18:47:51 +09:00
BurdetteLamar
be6447381c
[flori/json] RDoc enhancements
...
470d909c0d
2020-07-01 18:47:51 +09:00
BurdetteLamar
99980b3034
[flori/json] RDoc enhancements
...
7bee2c7c13
2020-07-01 18:47:51 +09:00
Marc-Andre Lafortune
fe10323a35
[flori/json] Fix test that wasn't testing anything
...
d5c6566b41
2020-07-01 18:47:51 +09:00
BurdetteLamar
4689fd5f99
[flori/json] Rdoc enhancements
...
e7e3732130
2020-07-01 18:47:50 +09:00
Nobuyoshi Nakada
1351374bd1
Split visibility cases
2020-06-30 19:12:05 +09:00
Nobuyoshi Nakada
52ef2477e4
Extracted METHOD_ENTRY_CACHEABLE macro
2020-06-30 19:12:02 +09:00
Nobuyoshi Nakada
74ac12830b
Evaluate macros argument just once
2020-06-30 19:12:00 +09:00
Samuel Giddins
7cb8904a12
Extract correct processor name for ARM64 Macs
2020-06-30 19:03:50 +09:00
git
15a312ed40
* 2020-06-30 [ci skip]
2020-06-30 17:14:18 +09:00
Kazuhiro NISHIYAMA
eefc2d8a3c
Fix a typo [ci skip]
2020-06-30 17:13:37 +09:00
Bart de Water
3621a7debf
Avoid deprecated OpenSSL::Digest constants
2020-06-29 13:25:32 +09:00
卜部昌平
1ce9c37257
Revert "RBIMPL_UNREACHABLE_RETURN: evaluate the argument"
...
This reverts commit c8dc2bf140
.
No longer necessary.
2020-06-29 12:33:17 +09:00
卜部昌平
94ab244b43
rb_class_modify_check: add UNREACHABLE
...
(I was not aware of this because I use clang, but) it seems gcc cannot
detect reachablility of this point. It renders an unused variable
warning, which is a false positive. Let us suppress the compiler.
816997191 (step)
:9:62
2020-06-29 11:43:48 +09:00
git
1020e120e0
* 2020-06-29 [ci skip]
2020-06-29 11:06:18 +09:00
卜部昌平
a523eca1c2
rb_enc_symname_type: refactor split
...
Reduce goto by splitting the function.
2020-06-29 11:05:41 +09:00
卜部昌平
2bd0f37e2b
glob_opendir: move cleanup codes at the end
...
Nobu likes this arrangement.
2020-06-29 11:05:41 +09:00
卜部昌平
da8af471fb
find_time_t: reset status before goto
2020-06-29 11:05:41 +09:00
卜部昌平
de3e931df7
add UNREACHABLE_RETURN
...
Not every compilers understand that rb_raise does not return. When a
function does not end with a return statement, such compilers can issue
warnings. We would better tell them about reachabilities.
2020-06-29 11:05:41 +09:00
卜部昌平
c8dc2bf140
RBIMPL_UNREACHABLE_RETURN: evaluate the argument
...
Prevent casual typos inside of UNREACHABLE_RETURN(...).
2020-06-29 11:05:41 +09:00
卜部昌平
bacd03ebdf
compile_redo: fix wrong condition
2020-06-29 11:05:41 +09:00
卜部昌平
2b636dc81d
make_exception: early return
...
The rb_exc_new3() result is already ready to be returned. No need to
fall through the switch.
2020-06-29 11:05:41 +09:00
卜部昌平
801752f577
builtin_class_name: add variant that return VALUE
...
Found that `if (builtin_class_name) { printf } else { printf }` happens
twice. It would be better if we could eliminate those if statements.
2020-06-29 11:05:41 +09:00
卜部昌平
2071c61e42
tracepoint_inspect: do not goto into a branch
...
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
2020-06-29 11:05:41 +09:00
卜部昌平
1bf0d36171
vm_getivar: do not goto into a branch
...
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
2020-06-29 11:05:41 +09:00
卜部昌平
6e67b30503
method_missing: do not goto into a branch
...
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
2020-06-29 11:05:41 +09:00
卜部昌平
edb1680a05
rb_method_call_status: do not goto into a branch
...
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
2020-06-29 11:05:41 +09:00
卜部昌平
f12efec2c2
vm_exec_handle_exception: do not goto into a branch
...
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
2020-06-29 11:05:41 +09:00
卜部昌平
b95b249784
rb_mod_remove_cvar: do not goto into a branch
...
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
2020-06-29 11:05:41 +09:00
卜部昌平
1e9d58391c
rb_copy_generic_ivar: do not goto into a branch
...
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
2020-06-29 11:05:41 +09:00
卜部昌平
fc45a061b9
generic_ivar_update: do not goto into a branch
...
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
2020-06-29 11:05:41 +09:00
卜部昌平
421db59c9e
rb_path_to_class: do not goto into a branch
...
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
2020-06-29 11:05:41 +09:00
卜部昌平
3d636eccfc
make_econv_exception: do not goto into a branch
...
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
2020-06-29 11:05:41 +09:00
卜部昌平
fd0e935886
time_mload: do not goto into a branch
...
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
2020-06-29 11:05:41 +09:00
卜部昌平
ed6938ef50
indent [ci skip]
2020-06-29 11:05:41 +09:00
卜部昌平
83f6de8691
find_time_t: do not goto into a branch
...
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
2020-06-29 11:05:41 +09:00
卜部昌平
ce6be8889f
utc_offset_arg: do not goto into a branch
...
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
2020-06-29 11:05:41 +09:00
卜部昌平
1c0a97bfad
vtm_add_offset: do not goto into a branch
...
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
2020-06-29 11:05:41 +09:00
卜部昌平
0fc569361b
num_exact: do not goto into a branch
...
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
2020-06-29 11:05:41 +09:00
卜部昌平
f402dc3557
rb_szqueue_push: do not goto into a branch
...
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
2020-06-29 11:05:41 +09:00
卜部昌平
8fc8912109
exec_recursive: do not goto into a branch
...
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
2020-06-29 11:05:41 +09:00
卜部昌平
08fc718e8c
indent [ci skip]
2020-06-29 11:05:41 +09:00
卜部昌平
ad6512f359
rb_enc_synmane_type: do not goto into a branch
...
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
2020-06-29 11:05:41 +09:00
卜部昌平
5f926b2b00
rb_str_partition: do not goto into a branch
...
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
2020-06-29 11:05:41 +09:00
卜部昌平
e3d821a36c
rb_str_crypt: do not goto into a branch
...
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
2020-06-29 11:05:41 +09:00
卜部昌平
a5ae9aebbc
trnext: do not goto into a branch
...
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
2020-06-29 11:05:41 +09:00
卜部昌平
c7a4073154
chompped_length: do not goto into a branch
...
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
2020-06-29 11:05:41 +09:00