Re: performance of the swtich/case statements

2014-10-30 Thread bycn82
actually I just checked that, no performance concern on the switch/case statement already, the compiler will sort the conditions in cases statements ,and since the opcodes are define in an enum, so the compiler will find out that all the conditions are in sequences :) On Fri, Oct 31, 2014 at 1:30

Re: performance of the swtich/case statements

2014-10-30 Thread Alfred Perlstein
Please run compiler with -O2 -S to get the assembly to see what will actually happen. thanks, -Alfred On 10/29/14 9:24 PM, bycn82 wrote: Hi, According to my understanding in Java programming, the compiler will automatically store the values into a table and jump to the correct one according to

Re: performance of the swtich/case statements

2014-10-30 Thread Erich Dollansky
Hi, On Thu, 30 Oct 2014 12:24:33 +0800 bycn82 wrote: > Hi, > According to my understanding in Java programming, the compiler will aren't we talking about C here? Erich > automatically store the values into a table and jump to the correct > one according to the value only when the condition v

Re: buf_ring in HEAD is racy

2014-10-30 Thread K. Macy
> > I also suspect there are further problems with buf_ring. A full wrap > around of the atomically swapped value is possible. I.e. the code thinks > it just atomically updated a head/tail index when in fact a full wrap > around occurred leading to undefined land. A relatively simple way to > avoi

Re: urtwn(4) Random freezes, urtwn_getbuf: out of xmit buffers

2014-10-30 Thread Sean Bruno
On Thu, 2014-10-30 at 11:09 -0700, Sean Bruno wrote: > On Thu, 2014-10-30 at 10:52 +0800, Kevin Lo wrote: > > On Tue, Oct 28, 2014 at 12:41:15PM -0700, Sean Bruno wrote: > > > > > > It looks like recent HEAD seems to fail intermittently here on my home > > > network. It will recover, but urtwn(4)

Re: urtwn(4) Random freezes, urtwn_getbuf: out of xmit buffers

2014-10-30 Thread Sean Bruno
On Thu, 2014-10-30 at 10:52 +0800, Kevin Lo wrote: > On Tue, Oct 28, 2014 at 12:41:15PM -0700, Sean Bruno wrote: > > > > It looks like recent HEAD seems to fail intermittently here on my home > > network. It will recover, but urtwn(4) seems to lose an ack or > > something on txmit. turning on de