fast_underscore

Hi Ruby folks,

In the flavor of Sam Saffron's fast_blank gem for speeding up AS' blank?
method, I wrote a fast_underscore gem (
https://github.com/kddeisz/fast_underscore) this weekend that does the same
for the AS underscore method (was noticing it in my stack profiling). Some
people may see a very small uptick in performance from their Rails apps
using this gem. YMMV.

···

--
*Kevin D. Deisz*
CTO, CultureHQ <http://www.culturehq.net/>

Great. Thanks for sharing

*​Best regards*,​

Ferdinand Rosario A
​Mobile : +91 8939939022
Twitter : @Ferdy_Rosario
Skype : ferdinand.rosario
LinkedIn: https://www.linkedin.com/in/ferdinandrosario
GitHub : ferdinandrosario (Ferdy) · GitHub

···

On 17 December 2017 at 00:46, Kevin Deisz <kevin.deisz@gmail.com> wrote:

Hi Ruby folks,

In the flavor of Sam Saffron's fast_blank gem for speeding up AS' blank?
method, I wrote a fast_underscore gem (https://github.com/kddeisz/
fast_underscore) this weekend that does the same for the AS underscore
method (was noticing it in my stack profiling). Some people may see a very
small uptick in performance from their Rails apps using this gem. YMMV.

--
*Kevin D. Deisz*
CTO, CultureHQ <http://www.culturehq.net/&gt;

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Hi,

Thanks for sharing the gem!

I wonder, why not adding this to the Active Support's String class instead
having a gem for this? I guess everybody wants to have a more efficient
underscore method. :wink:

Regards,

Ana

···

On 2017-12-16 20:16, Kevin Deisz wrote:

Hi Ruby folks,

In the flavor of Sam Saffron's fast_blank gem for speeding up AS' blank?
method, I wrote a fast_underscore gem (
https://github.com/kddeisz/fast_underscore\) this weekend that does the same
for the AS underscore method (was noticing it in my stack profiling). Some
people may see a very small uptick in performance from their Rails apps
using this gem. YMMV.

--
Ana María Martínez Gómez - ammartinez@suse.de | ammartinez@suse.com
BuildService Engineer
SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnberg
Tel: +49-911-74053-0; Fax: +49-911-7417755; https://www.suse.com/
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard,
   Graham Norton, HRB 21284 (AG Nürnberg)

I hadn't approached the Rails team about it, but I doubt it would get
merged if I open a PR. There isn't currently any C code in the Rails
codebase (excluding dependencies), and they probably don't want to take on
that maintenance burden. If this thing takes off maybe we could talk about
it. It might actually even make more sense in bootsnap than Rails anyway
just because `underscore` is most heavily used during the start-up period.

···

On Wed, Dec 27, 2017 at 10:24 AM, ammartinez <ammartinez@suse.de> wrote:

On 2017-12-16 20:16, Kevin Deisz wrote:

Hi Ruby folks,

In the flavor of Sam Saffron's fast_blank gem for speeding up AS' blank?
method, I wrote a fast_underscore gem (
https://github.com/kddeisz/fast_underscore\) this weekend that does the
same
for the AS underscore method (was noticing it in my stack profiling). Some
people may see a very small uptick in performance from their Rails apps
using this gem. YMMV.

Hi,

Thanks for sharing the gem!

I wonder, why not adding this to the Active Support's String class instead
having a gem for this? I guess everybody wants to have a more efficient
underscore method. :wink:

Regards,

Ana

--
Ana María Martínez Gómez - ammartinez@suse.de | ammartinez@suse.com
BuildService Engineer
SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnberg
Tel: +49-911-74053-0; Fax: +49-911-7417755; https://www.suse.com/
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard,
  Graham Norton, HRB 21284 (AG Nürnberg)

--
*Kevin D. Deisz*
CTO, CultureHQ <http://www.culturehq.net/&gt;

I hadn't approached the Rails team about it, but I doubt it would get
merged if I open a PR. There isn't currently any C code in the Rails
codebase (excluding dependencies), and they probably don't want to take on
that maintenance burden. If this thing takes off maybe we could talk about
it. It might actually even make more sense in bootsnap than Rails anyway
just because `underscore` is most heavily used during the start-up period.

Including the gem in bootsnap sounds like a good idea. :wink:

···

On 2017-12-27 16:27, Kevin Deisz wrote:

On Wed, Dec 27, 2017 at 10:24 AM, ammartinez <ammartinez@suse.de> > wrote:

On 2017-12-16 20:16, Kevin Deisz wrote:

Hi Ruby folks,

In the flavor of Sam Saffron's fast_blank gem for speeding up AS' blank?
method, I wrote a fast_underscore gem (
https://github.com/kddeisz/fast_underscore\) this weekend that does the
same
for the AS underscore method (was noticing it in my stack profiling). Some
people may see a very small uptick in performance from their Rails apps
using this gem. YMMV.

Hi,

Thanks for sharing the gem!

I wonder, why not adding this to the Active Support's String class instead
having a gem for this? I guess everybody wants to have a more efficient
underscore method. :wink:

Regards,

Ana

--
Ana María Martínez Gómez - ammartinez@suse.de | ammartinez@suse.com
BuildService Engineer
SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnberg
Tel: +49-911-74053-0; Fax: +49-911-7417755; https://www.suse.com/
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard,
  Graham Norton, HRB 21284 (AG Nürnberg)

--
Ana María Martínez Gómez - ammartinez@suse.de | ammartinez@suse.com
BuildService Engineer
SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnberg
Tel: +49-911-74053-0; Fax: +49-911-7417755; https://www.suse.com/
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard,
   Graham Norton, HRB 21284 (AG Nürnberg)

it could work but it would increase the scope of bootsnap so I am not
sure @burke would want it

probably better just to make a "fast_as" that includes fast_blank,
fast_underscore, fast_xs and a few others... plus fast_as is an
awesome name.

···

On Tue, Jan 2, 2018 at 10:58 PM, ammartinez <ammartinez@suse.de> wrote:

On 2017-12-27 16:27, Kevin Deisz wrote:

I hadn't approached the Rails team about it, but I doubt it would get
merged if I open a PR. There isn't currently any C code in the Rails
codebase (excluding dependencies), and they probably don't want to take on
that maintenance burden. If this thing takes off maybe we could talk about
it. It might actually even make more sense in bootsnap than Rails anyway
just because `underscore` is most heavily used during the start-up period.

Including the gem in bootsnap sounds like a good idea. :wink:

On Wed, Dec 27, 2017 at 10:24 AM, ammartinez <ammartinez@suse.de> wrote:

On 2017-12-16 20:16, Kevin Deisz wrote:

Hi Ruby folks,

In the flavor of Sam Saffron's fast_blank gem for speeding up AS' blank?
method, I wrote a fast_underscore gem (
https://github.com/kddeisz/fast_underscore\) this weekend that does the
same
for the AS underscore method (was noticing it in my stack profiling).
Some
people may see a very small uptick in performance from their Rails apps
using this gem. YMMV.

Hi,

Thanks for sharing the gem!

I wonder, why not adding this to the Active Support's String class
instead
having a gem for this? I guess everybody wants to have a more efficient
underscore method. :wink:

Regards,

Ana

--
Ana María Martínez Gómez - ammartinez@suse.de | ammartinez@suse.com
BuildService Engineer
SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnberg
Tel: +49-911-74053-0; Fax: +49-911-7417755; https://www.suse.com/
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard,
  Graham Norton, HRB 21284 (AG Nürnberg)

--
Ana María Martínez Gómez - ammartinez@suse.de | ammartinez@suse.com
BuildService Engineer
SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnberg
Tel: +49-911-74053-0; Fax: +49-911-7417755; https://www.suse.com/
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard,
  Graham Norton, HRB 21284 (AG Nürnberg)

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Yep, that's would be awesome. And I guess it would be easier to maintain the
code of this gems if it was everything together as there would be more
people involved in the development.

I like the name as well :wink:

···

On 2018-01-05 09:28, Sam Saffron wrote:

it could work but it would increase the scope of bootsnap so I am not
sure @burke would want it

probably better just to make a "fast_as" that includes fast_blank,
fast_underscore, fast_xs and a few others... plus fast_as is an
awesome name.

On Tue, Jan 2, 2018 at 10:58 PM, ammartinez <ammartinez@suse.de> wrote:

On 2017-12-27 16:27, Kevin Deisz wrote:

I hadn't approached the Rails team about it, but I doubt it would get
merged if I open a PR. There isn't currently any C code in the Rails
codebase (excluding dependencies), and they probably don't want to take on
that maintenance burden. If this thing takes off maybe we could talk about
it. It might actually even make more sense in bootsnap than Rails anyway
just because `underscore` is most heavily used during the start-up period.

Including the gem in bootsnap sounds like a good idea. :wink:

On Wed, Dec 27, 2017 at 10:24 AM, ammartinez <ammartinez@suse.de> >>> wrote:

On 2017-12-16 20:16, Kevin Deisz wrote:

Hi Ruby folks,

In the flavor of Sam Saffron's fast_blank gem for speeding up AS' blank?
method, I wrote a fast_underscore gem (
https://github.com/kddeisz/fast_underscore\) this weekend that does the
same
for the AS underscore method (was noticing it in my stack profiling).
Some
people may see a very small uptick in performance from their Rails apps
using this gem. YMMV.

Hi,

Thanks for sharing the gem!

I wonder, why not adding this to the Active Support's String class
instead
having a gem for this? I guess everybody wants to have a more efficient
underscore method. :wink:

Regards,

Ana

--
Ana María Martínez Gómez - ammartinez@suse.de | ammartinez@suse.com
BuildService Engineer
SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnberg
Tel: +49-911-74053-0; Fax: +49-911-7417755; https://www.suse.com/
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard,
  Graham Norton, HRB 21284 (AG Nürnberg)

--
Ana María Martínez Gómez - ammartinez@suse.de | ammartinez@suse.com
BuildService Engineer
SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnberg
Tel: +49-911-74053-0; Fax: +49-911-7417755; https://www.suse.com/
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard,
  Graham Norton, HRB 21284 (AG Nürnberg)

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

--
Ana María Martínez Gómez - ammartinez@suse.de | ammartinez@suse.com
BuildService Engineer
SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnberg
Tel: +49-911-74053-0; Fax: +49-911-7417755; https://www.suse.com/
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard,
   Graham Norton, HRB 21284 (AG Nürnberg)

1 Like

What about trying to get it into Ruby standard lib?

···

On Fri, Jan 5, 2018 at 5:10 AM ammartinez <ammartinez@suse.de> wrote:

Yep, that's would be awesome. And I guess it would be easier to maintain
the
code of this gems if it was everything together as there would be more
people involved in the development.

I like the name as well :wink:

On 2018-01-05 09:28, Sam Saffron wrote:
> it could work but it would increase the scope of bootsnap so I am not
> sure @burke would want it
>
> probably better just to make a "fast_as" that includes fast_blank,
> fast_underscore, fast_xs and a few others... plus fast_as is an
> awesome name.

> On Tue, Jan 2, 2018 at 10:58 PM, ammartinez <ammartinez@suse.de> wrote:
>> On 2017-12-27 16:27, Kevin Deisz wrote:
>>>
>>> I hadn't approached the Rails team about it, but I doubt it would get
>>> merged if I open a PR. There isn't currently any C code in the Rails
>>> codebase (excluding dependencies), and they probably don't want to
>>> take on
>>> that maintenance burden. If this thing takes off maybe we could talk
>>> about
>>> it. It might actually even make more sense in bootsnap than Rails
>>> anyway
>>> just because `underscore` is most heavily used during the start-up
>>> period.
>>
>>
>> Including the gem in bootsnap sounds like a good idea. :wink:
>>
>>
>>>
>>> On Wed, Dec 27, 2017 at 10:24 AM, ammartinez <ammartinez@suse.de> > >>> wrote:
>>>
>>>> On 2017-12-16 20:16, Kevin Deisz wrote:
>>>>
>>>>> Hi Ruby folks,
>>>>>
>>>>> In the flavor of Sam Saffron's fast_blank gem for speeding up AS'
>>>>> blank?
>>>>> method, I wrote a fast_underscore gem (
>>>>> https://github.com/kddeisz/fast_underscore\) this weekend that does
>>>>> the
>>>>> same
>>>>> for the AS underscore method (was noticing it in my stack
>>>>> profiling).
>>>>> Some
>>>>> people may see a very small uptick in performance from their Rails
>>>>> apps
>>>>> using this gem. YMMV.
>>>>>
>>>>
>>>>
>>>> Hi,
>>>>
>>>> Thanks for sharing the gem!
>>>>
>>>> I wonder, why not adding this to the Active Support's String class
>>>> instead
>>>> having a gem for this? I guess everybody wants to have a more
>>>> efficient
>>>> underscore method. :wink:
>>>>
>>>> Regards,
>>>>
>>>> Ana
>>>>
>>>> --
>>>> Ana María Martínez Gómez - ammartinez@suse.de | ammartinez@suse.com
>>>> BuildService Engineer
>>>> SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnberg
>>>> Tel: +49-911-74053-0; Fax: +49-911-7417755; https://www.suse.com/
>>>> SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard,
>>>> Graham Norton, HRB 21284 (AG Nürnberg)
>>>>
>>
>> --
>> Ana María Martínez Gómez - ammartinez@suse.de | ammartinez@suse.com
>> BuildService Engineer
>> SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnberg
>> Tel: +49-911-74053-0; Fax: +49-911-7417755; https://www.suse.com/
>> SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard,
>> Graham Norton, HRB 21284 (AG Nürnberg)
>>
>> Unsubscribe:
>> <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
>> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;
>
> Unsubscribe:
> <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

--
Ana María Martínez Gómez - ammartinez@suse.de | ammartinez@suse.com
BuildService Engineer
SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnberg
Tel: +49-911-74053-0; Fax: +49-911-7417755; https://www.suse.com/
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard,
   Graham Norton, HRB 21284 (AG Nürnberg)

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

These inflections feel particularly ActiveSupport-y. I’m not sure it would
make sense for standard lib to have to maintain it. It’s fine in a gem for
now, if it starts taking off (it hasn’t yet) we can reconsider moving it.

···

On Thu, Jan 25, 2018 at 11:51 PM Ryan Buckley <duhryguy@gmail.com> wrote:

What about trying to get it into Ruby standard lib?

On Fri, Jan 5, 2018 at 5:10 AM ammartinez <ammartinez@suse.de> wrote:

Yep, that's would be awesome. And I guess it would be easier to maintain
the
code of this gems if it was everything together as there would be more
people involved in the development.

I like the name as well :wink:

On 2018-01-05 09:28, Sam Saffron wrote:
> it could work but it would increase the scope of bootsnap so I am not
> sure @burke would want it
>
> probably better just to make a "fast_as" that includes fast_blank,
> fast_underscore, fast_xs and a few others... plus fast_as is an
> awesome name.

> On Tue, Jan 2, 2018 at 10:58 PM, ammartinez <ammartinez@suse.de> wrote:
>> On 2017-12-27 16:27, Kevin Deisz wrote:
>>>
>>> I hadn't approached the Rails team about it, but I doubt it would get
>>> merged if I open a PR. There isn't currently any C code in the Rails
>>> codebase (excluding dependencies), and they probably don't want to
>>> take on
>>> that maintenance burden. If this thing takes off maybe we could talk
>>> about
>>> it. It might actually even make more sense in bootsnap than Rails
>>> anyway
>>> just because `underscore` is most heavily used during the start-up
>>> period.
>>
>>
>> Including the gem in bootsnap sounds like a good idea. :wink:
>>
>>
>>>
>>> On Wed, Dec 27, 2017 at 10:24 AM, ammartinez <ammartinez@suse.de> >> >>> wrote:
>>>
>>>> On 2017-12-16 20:16, Kevin Deisz wrote:
>>>>
>>>>> Hi Ruby folks,
>>>>>
>>>>> In the flavor of Sam Saffron's fast_blank gem for speeding up AS'
>>>>> blank?
>>>>> method, I wrote a fast_underscore gem (
>>>>> https://github.com/kddeisz/fast_underscore\) this weekend that does
>>>>> the
>>>>> same
>>>>> for the AS underscore method (was noticing it in my stack
>>>>> profiling).
>>>>> Some
>>>>> people may see a very small uptick in performance from their Rails
>>>>> apps
>>>>> using this gem. YMMV.
>>>>>
>>>>
>>>>
>>>> Hi,
>>>>
>>>> Thanks for sharing the gem!
>>>>
>>>> I wonder, why not adding this to the Active Support's String class
>>>> instead
>>>> having a gem for this? I guess everybody wants to have a more
>>>> efficient
>>>> underscore method. :wink:
>>>>
>>>> Regards,
>>>>
>>>> Ana
>>>>
>>>> --
>>>> Ana María Martínez Gómez - ammartinez@suse.de | ammartinez@suse.com
>>>> BuildService Engineer
>>>> SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnberg
>>>> Tel: +49-911-74053-0; Fax: +49-911-7417755; https://www.suse.com/
>>>> SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard,
>>>> Graham Norton, HRB 21284 (AG Nürnberg)
>>>>
>>
>> --
>> Ana María Martínez Gómez - ammartinez@suse.de | ammartinez@suse.com
>> BuildService Engineer
>> SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnberg
>> Tel: +49-911-74053-0; Fax: +49-911-7417755; https://www.suse.com/
>> SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard,
>> Graham Norton, HRB 21284 (AG Nürnberg)
>>
>> Unsubscribe:
>> <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
>> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;
>
> Unsubscribe:
> <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

--
Ana María Martínez Gómez - ammartinez@suse.de | ammartinez@suse.com
BuildService Engineer
SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnberg
Tel: +49-911-74053-0; Fax: +49-911-7417755; https://www.suse.com/
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard,
   Graham Norton, HRB 21284 (AG Nürnberg)

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

--
*Kevin D. Deisz*
CTO, CultureHQ <https://www.culturehq.com>