Loading ...
Sorry, an error occurred while loading the content.

1467Re: [jslint] slice method appears slower in loops than incrementally listing array indexes

Expand Messages
  • Cheney, Edward A SSG RES USAR
    Sep 3, 2010
    • 0 Attachment
      Marcel,

      I did consider those. The limitation of indexOf method is that it can only be used once without altering your source data, and regular expression would certainly be faster, but there is no native method for using a regular expression to return a list of indexes.

      As far as which tests I was using I was altering the type_define function of the markup_beauty function to obtain both tests. I used the it function of the markupmin function to discover the exception situation. Both of those scripts are components of a Pretty Diff tool I maintain at prettydiff.com

      http://prettydiff.com/markup_beauty.js
      http://prettydiff.com/markupmin.js

      Thanks,
      Austin
    • Show all 5 messages in this topic