Feature #10219
closed
[PATCH] time.c: DATA_PTR is never NULL
Added by normalperson (Eric Wong) about 10 years ago.
Updated about 10 years ago.
Description
Tiny improvement on my older Phenom II X4 945 system:
$ ruby --disable=gems -e '6000000.times { Time.now }'
before: 2.51user 0.00system 0:02.51elapsed 100%CPU
after: 2.45user 0.00system 0:02.45elapsed 100%CPU
Will commit soon unless I missed something which zeros DATA_PTR.
Files
- Status changed from Open to Assigned
Seems fine.
RUBY_TYPED_DEFAULT_FREE
also does nothing if DATA_PTR
is NULL
, as same as time_free
does now.
And tobj
should not be NULL
as Time.allocate
always allocate it.
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
Applied in changeset r47506.
time.c: DATA_PTR is never NULL
- time.c (time_mark): remove NULL check
(time_memsize): ditto
(time_free): remove, use RUBY_TYPED_DEFAULT_FREE instead
[Feature #10219]
Tiny improvement on my old Phenom II X4 945 system:
$ ruby --disable=gems -e '6000000.times { Time.now }'
before: 2.51user 0.00system 0:02.51elapsed 100%CPU
after: 2.45user 0.00system 0:02.45elapsed 100%CPU
Also available in: Atom
PDF
Like0
Like0Like0