From: "NARUSE, Yui" Date: 2015-11-19T09:10:42+09:00 Subject: [ruby-core:71566] Re: [ruby-cvs:59665] naruse:r52514 (trunk): * time.c (rb_timespec_now): added. On 2015/11/10 12:20, Eric Wong wrote: > naruse@ruby-lang.org wrote: >> * time.c (rb_timespec_now): added. >> * time.c (rb_time_timespec_new): added. > > Hi, can you summarize the reasoning for this? Thanks. I forgot to add a link to https://bugs.ruby-lang.org/issues/11558 Anyway it is for strptime.gem. https://github.com/nurse/strptime rb_timespec_now is to get current time without rb_funcall but portable. rb_time_timespec_new is to get time object without calculating timew. With nano seconds, calculating Rational with many rb_funcall is too slow. NOTE: strptime.gem is mainly for fluentd, a log collecting tool, it needs to parse 1M lines of logs in a second. -- NARUSE, Yui