zed.0xff.me

Ruby: fastest way of converting string into array of characters

timecodecomment
0.147 s.bytes.to_amost fastest, but returns ASCII codes instead of chars
0.242 s.chars.to_a FASTEST
0.257 Array(s.chars)
0.265 a=[]; s.size.times{ |i| a<<s[i] }
0.268 a=[]; s.chars.each{ |c| a<<c }
0.278 s.bytes.map(&:chr)
0.513 s.scan(/./)
0.775 s.split(//)
0.795 s.split('') SLOWEST

first column is time of 100.000 iterations on Core i5 1.7GHz

code: bench-split.rb

  1. Gravatar DorisVeibe says:

    Revolutional update of SEO/SMM package "XRumer 16.0 + XEvil":
    captcha recognition of Google, Facebook, Bing, Hotmail, SolveMedia, Yandex,
    and more than 8400 another size-types of captchas,
    with highest precision (80..100%) and highest speed (100 img per second).
    You can connect XEvil 3.0 to all most popular SEO/SMM programms: XRumer, GSA SER, ZennoPoster, Srapebox, Senuke, and more than 100 of other software.

    Interested? You can find a lot of introducing videos about XEvil in YouTube.
    Good luck ;)


    XRumer201707

  2. Gravatar DorisVeibe says:

    Revolutional update of SEO/SMM software "XRumer 16.0 + XEvil":
    captchas recognition of Google, Facebook, Bing, Hotmail, SolveMedia, Yandex,
    and more than 8400 another types of captchas,
    with highest precision (80..100%) and highest speed (100 img per second).
    You can connect XEvil 3.0 to all most popular SEO/SMM programms: XRumer, GSA SER, ZennoPoster, Srapebox, Senuke, and more than 100 of other programms.

    Interested? You can find a lot of impessive videos about XEvil in YouTube.
    See you later ;)


    XRumer201707

  3. Gravatar DorothyPlaum says:

    Absolutely NEW update of SEO/SMM package "XRumer 16.0 + XEvil 3.0":
    captchas recognition of Google, Facebook, Bing, Hotmail, SolveMedia, Yandex,
    and more than 8400 another subtypes of captchas,
    with highest precision (80..100%) and highest speed (100 img per second).
    You can connect XEvil 3.0 to all most popular SEO/SMM software: XRumer, GSA SER, ZennoPoster, Srapebox, Senuke, and more than 100 of other software.

    Interested? You can find a lot of impessive videos about XEvil in YouTube.
    Good luck!


    XRumer20170717

  4. Gravatar DorothyPlaum says:

    Absolutely NEW update of SEO/SMM package "XRumer 16.0 + XEvil":
    captchas recognition of Google, Facebook, Bing, Hotmail, SolveMedia, Yandex,
    and more than 8400 another categories of captchas,
    with highest precision (80..100%) and highest speed (100 img per second).
    You can connect XEvil 3.0 to all most popular SEO/SMM programms: XRumer, GSA SER, ZennoPoster, Srapebox, Senuke, and more than 100 of other programms.

    Interested? You can find a lot of impessive videos about XEvil in YouTube.
    See you later ;)


    XRumer20170718

  5. Gravatar DorothyPlaum says:

    Revolutional update of SEO/SMM package "XRumer 16.0 + XEvil":
    captchas recognition of Google, Facebook, Bing, Hotmail, SolveMedia, Yandex,
    and more than 8400 another size-types of captcha,
    with highest precision (80..100%) and highest speed (100 img per second).
    You can connect XEvil 3.0 to all most popular SEO/SMM programms: XRumer, GSA SER, ZennoPoster, Srapebox, Senuke, and more than 100 of other software.

    Interested? There are a lot of demo videos about XEvil in YouTube.
    See you later ;)


    XRumer20170718

  6. Gravatar lolaVienome says:

    Тут посмотрела 3 и 4 серию, ЭМОЦИЙ ВАГОН ПРОСТО.

    <a href="http://tiod.ru/trejlery/igra-prestolov.html">Игра Престолов 7 сезон </a>

    p.s Жаль 5 серии еще нет обещали завтра!

  7. Gravatar lolaVienome says:

    Тут посмотрела 3 и 4 серию, ЭМОЦИЙ ВАГОН ПРОСТО.

    <a href="http://tiod.ru/trejlery/igra-prestolov.html">Игра Престолов 7 сезон </a>

    p.s Жаль 5 серии еще нет обещали завтра!

  8. Gravatar lolaVienome says:

    Тут посмотрела 3 и 4 серию, ЭМОЦИЙ ВАГОН ПРОСТО.

    <a href="http://tiod.ru/trejlery/igra-prestolov.html">Игра Престолов 7 сезон </a>

    p.s Жаль 5 серии еще нет обещали завтра!

  9. Gravatar ArleneZer says:

    Absolutely NEW update of SEO/SMM package "XRumer 16.0 + XEvil 3.0":
    captchas breaking of Google, Facebook, Bing, Hotmail, SolveMedia, Yandex,
    and more than 8400 another subtypes of captchas,
    with highest precision (80..100%) and highest speed (100 img per second).
    You can connect XEvil 3.0 to all most popular SEO/SMM software: XRumer, GSA SER, ZennoPoster, Srapebox, Senuke, and more than 100 of other software.

    Interested? You can find a lot of demo videos about XEvil in YouTube.
    See you later!


    XRumer20170721

  10. Gravatar ArleneZer says:

    Revolutional update of SEO/SMM package "XRumer 16.0 + XEvil 3.0":
    captcha regignizing of Google, Facebook, Bing, Hotmail, SolveMedia, Yandex,
    and more than 8400 another size-types of captcha,
    with highest precision (80..100%) and highest speed (100 img per second).
    You can connect XEvil 3.0 to all most popular SEO/SMM programms: XRumer, GSA SER, ZennoPoster, Srapebox, Senuke, and more than 100 of other software.

    Interested? You can find a lot of impessive videos about XEvil in YouTube.
    See you later!


    XRumer20170721

  11. Gravatar ArleneZer says:

    Revolutional update of SEO/SMM package "XRumer 16.0 + XEvil 3.0":
    captcha breaking of Google, Facebook, Bing, Hotmail, SolveMedia, Yandex,
    and more than 8400 another categories of captcha,
    with highest precision (80..100%) and highest speed (100 img per second).
    You can connect XEvil 3.0 to all most popular SEO/SMM software: XRumer, GSA SER, ZennoPoster, Srapebox, Senuke, and more than 100 of other software.

    Interested? You can find a lot of demo videos about XEvil in YouTube.
    Good luck!


    XRumer20170721

  12. Gravatar ArleneZer says:

    Revolutional update of SEO/SMM software "XRumer 16.0 + XEvil 3.0":
    captcha solution of Google, Facebook, Bing, Hotmail, SolveMedia, Yandex,
    and more than 8400 another categories of captchas,
    with highest precision (80..100%) and highest speed (100 img per second).
    You can connect XEvil 3.0 to all most popular SEO/SMM software: XRumer, GSA SER, ZennoPoster, Srapebox, Senuke, and more than 100 of other software.

    Interested? There are a lot of impessive videos about XEvil in YouTube.
    Good luck!


    XRumer20170721

  13. Gravatar ArleneZer says:

    Absolutely NEW update of SEO/SMM package "XRumer 16.0 + XEvil 3.0":
    captchas recognition of Google, Facebook, Bing, Hotmail, SolveMedia, Yandex,
    and more than 8400 another categories of captcha,
    with highest precision (80..100%) and highest speed (100 img per second).
    You can connect XEvil 3.0 to all most popular SEO/SMM programms: XRumer, GSA SER, ZennoPoster, Srapebox, Senuke, and more than 100 of other software.

    Interested? You can find a lot of introducing videos about XEvil in YouTube.
    See you later!


    XRumer20170721

  14. Gravatar FlossieLef says:

    Absolutely NEW update of SEO/SMM package "XRumer 16.0 + XEvil 3.0":
    captchas solving of Google, Facebook, Bing, Hotmail, SolveMedia, Yandex,
    and more than 8400 another size-types of captcha,
    with highest precision (80..100%) and highest speed (100 img per second).
    You can connect XEvil 3.0 to all most popular SEO/SMM programms: XRumer, GSA SER, ZennoPoster, Srapebox, Senuke, and more than 100 of other programms.

    Interested? You can find a lot of impessive videos about XEvil in YouTube.
    Good luck!


    XRumer20170725

  15. Gravatar FlossieLef says:

    Revolutional update of SEO/SMM software "XRumer 16.0 + XEvil 3.0":
    captchas recognition of Google, Facebook, Bing, Hotmail, SolveMedia, Yandex,
    and more than 8400 another subtypes of captchas,
    with highest precision (80..100%) and highest speed (100 img per second).
    You can connect XEvil 3.0 to all most popular SEO/SMM software: XRumer, GSA SER, ZennoPoster, Srapebox, Senuke, and more than 100 of other programms.

    Interested? There are a lot of introducing videos about XEvil in YouTube.
    See you later!


    XRumer20170725

Post a comment


(lesstile enabled - surround code blocks with ---)