1. 30 Aug, 2016 1 commit
    • Explorer09's avatar
      Mark signal tables 'const' · 1f3d85b6
      Explorer09 authored
      
      
      Specifically, Platform_signals[] and Platform_numberOfSignals. Both are
      not supposed to be mutable. Marking them 'const' puts them into rodata
      sections in binary. And for Platform_numberOfSignals, this aids
      optimization (aids only Link Time Optimization for now). :)
      Signed-off-by: default avatarKang-Che Sung <explorer09@gmail.com>
      1f3d85b6
  2. 24 Aug, 2016 2 commits
  3. 23 Aug, 2016 1 commit
  4. 11 Aug, 2016 2 commits
    • Hisham Muhammad's avatar
      Merge pull request #537 from Explorer09/string-utils · d3f57526
      Hisham Muhammad authored
      Optimize Strings_startWith()
      d3f57526
    • Explorer09's avatar
      Optimize Strings_startWith() · bf35921a
      Explorer09 authored
      Use strncmp() combined with a strlen() will give better performance
      than a strstr in worst case. Especially when the match prefix is a
      constant and not a variable.
      
      While we are at it, replace the match() function in linux/Battery.c,
      which uses a naive algorithm, with a macro that does better job by
      utilizing Strings_startWith().
      
          $ gcc --version | head -n 1
          gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
          $ uname -m
          x86_64
          $ size htop.old htop.new
             text   data    bss    dec    hex filename
           137929  15112   3776 156817  26491 htop.old
           137784  15104   3776 156664  263f8 htop.new
      
      Signed-off-by: Kang-Che Sung <explorer09 @ gmail.com>
      bf35921a
  5. 09 Aug, 2016 1 commit
  6. 06 Aug, 2016 1 commit
    • Explorer09's avatar
      Fix scrolling behavior change caused by 759caf0f · 3d986883
      Explorer09 authored
      Commit "Make PgDown behavior more usual." 759caf0f
      silently changes the PageDown scrolling behavior that, instead of
      scrolling one window down until the end of the window touches the end
      of the list, the window simply repositions itself in a way that the
      selected item always become the last item in the new window.
      
      The commit reverts the behavior, and also fixes sanity conditionals
      so that the scrollV variable will _never_ become negative or out-of-
      bound.
      
      Fixes issue #532. Also keep the problem #480 addressed.
      
      Signed-off-by: Kang-Che Sung <explorer09 @ gmail.com>
      3d986883
  7. 28 Jul, 2016 2 commits
  8. 23 Jul, 2016 1 commit
  9. 22 Jul, 2016 1 commit
  10. 21 Jul, 2016 2 commits
  11. 12 Jul, 2016 1 commit
  12. 11 Jul, 2016 1 commit
  13. 23 Jun, 2016 1 commit
  14. 20 Jun, 2016 1 commit
  15. 19 Jun, 2016 3 commits
  16. 18 Jun, 2016 1 commit
  17. 17 Jun, 2016 2 commits
  18. 15 Jun, 2016 3 commits
  19. 04 Jun, 2016 1 commit
  20. 03 Jun, 2016 1 commit
  21. 02 Jun, 2016 3 commits
  22. 30 May, 2016 5 commits
  23. 27 May, 2016 2 commits
  24. 26 May, 2016 1 commit