From: nobu@... Date: 2014-09-10T01:24:18+00:00 Subject: [ruby-core:64908] [ruby-trunk - Feature #10219] [Assigned] [PATCH] time.c: DATA_PTR is never NULL Issue #10219 has been updated by Nobuyoshi Nakada. 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. ---------------------------------------- Feature #10219: [PATCH] time.c: DATA_PTR is never NULL https://bugs.ruby-lang.org/issues/10219#change-48765 * Author: Eric Wong * Status: Assigned * Priority: Low * Assignee: Eric Wong * Category: core * Target version: current: 2.2.0 ---------------------------------------- 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-------------------------------- 0001-time.c-DATA_PTR-is-never-NULL.patch (1.4 KB) -- https://bugs.ruby-lang.org/