what is speed JS or JQ

KPZ

Well-known member
  • Apr 15, 2011
    17,331
    1,622
    113
    where I wanna be
    Hey guys what is the fastest one from jQuery and JavaSript?

    02b2cf0224be38347f1574b404906589.jpg

    most of the time JS has the fastest single execution
    for an example :-

    document.getElementById('id_name') > $('#id_name')
    first on is faster than second one.

    But what do you think,
    when we consider about overall performance..
    what is the fastest one?
     

    anurud

    Active member
  • Sep 16, 2009
    378
    239
    43
    JS.

    JQ is created using JS (JQ is a JS Library).
    JQ is easy to use but JS is fast.

    i.e : internally $('#id_name') calls document.getElementById('id_name').
     
    Last edited:

    KPZ

    Well-known member
  • Apr 15, 2011
    17,331
    1,622
    113
    where I wanna be
    JS.

    JQ is created using JS (JQ is a JS Library).
    JQ is easy to use but JS is fast.

    i.e : internally $('#id_name') calls document.getElementById('id_name').

    It seems JS is faster :(

    we use this method to change the background-color from jQ
    HTML:
    $('body').css('background', '#ccc');

    so what this calls internally?
     

    JesonRulez

    Well-known member
  • Jul 17, 2013
    18,684
    1,935
    113
    ළිං පතුල
    Why bother too much about the speed as the devices nowadays are really fast enough to execute everything too fast. So you won't even notice the distinction between the two. We should only care too much about the speed when we are working on too much logic and loops.

    (My personal opinion only)
     
    • Like
    Reactions: KPZ

    KPZ

    Well-known member
  • Apr 15, 2011
    17,331
    1,622
    113
    where I wanna be
    Why bother too much about the speed as the devices nowadays are really fast enough to execute everything too fast. So you won't even notice the distinction between the two. We should only care too much about the speed when we are working on too much logic and loops.

    (My personal opinion only)
    True machan... :yes:
    But every little helps ;)