Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1326535

RE: [PATCH 1/2] rtlwifi: Fix improve function 'rtl_addr_delay()' in core.c

From David Laight <David.Laight@ACULAB.COM>
Newsgroups linux.kernel
Subject RE: [PATCH 1/2] rtlwifi: Fix improve function 'rtl_addr_delay()' in core.c
Date 2016-02-04 11:00 +0100
Message-ID <qYoRH-6RL-1@gated-at.bofh.it> (permalink)
References <qXV3j-42k-3@gated-at.bofh.it> <qY6UO-3c5-3@gated-at.bofh.it> <qY9J1-54N-11@gated-at.bofh.it> <qYbB7-6f1-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Larry Finger
> Sent: 03 February 2016 19:45
...
> The performance will depend on where you satisfy the condition. All switch cases
> have the same execution time, but in the if .. else if .. else form, the earlier
> tests execute more quickly. I'm not sure that one can make any blanket statement
> about performance. Certainly, the switch version will be larger. For a switch
> with 8 cases plus default, the object code if 43 bytes larger than the nested
> ifs in a test program that I created. That is a significant penalty.

There is also the penalty of the (likely) data cache miss reading the jump table.
But given this code is all about generating a variable delay the execution
speed is probably irrelevant.

It would be much more interesting if the delay could be changed for sleeps.

	David

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] rtlwifi: Fix improve function 'rtl_addr_delay()' in  core.c Byeoungwook Kim <quddnr145@gmail.com> - 2016-02-03 03:10 +0100
  RE: [PATCH 1/2] rtlwifi: Fix improve function 'rtl_addr_delay()' in  core.c David Laight <David.Laight@ACULAB.COM> - 2016-02-03 15:50 +0100
    Re: [PATCH 1/2] rtlwifi: Fix improve function 'rtl_addr_delay()' in core.c ByeoungWook Kim <quddnr145@gmail.com> - 2016-02-03 18:50 +0100
      Re: [PATCH 1/2] rtlwifi: Fix improve function 'rtl_addr_delay()' in  core.c Larry Finger <Larry.Finger@lwfinger.net> - 2016-02-03 20:50 +0100
        RE: [PATCH 1/2] rtlwifi: Fix improve function 'rtl_addr_delay()' in  core.c David Laight <David.Laight@ACULAB.COM> - 2016-02-04 11:00 +0100
          Re: [PATCH 1/2] rtlwifi: Fix improve function 'rtl_addr_delay()' in  core.c Larry Finger <Larry.Finger@lwfinger.net> - 2016-02-04 16:50 +0100
            RE: [PATCH 1/2] rtlwifi: Fix improve function 'rtl_addr_delay()' in  core.c David Laight <David.Laight@ACULAB.COM> - 2016-02-04 17:10 +0100

csiph-web