https://codereview.chromium.org/23655004/diff/1/src/cpu.cc
File src/cpu.cc (right):

https://codereview.chromium.org/23655004/diff/1/src/cpu.cc#newcode456
src/cpu.cc:456: int CPU::NumberOfProcessorsOnline() {
On 2013/08/31 22:10:46, tfarina wrote:
looks like the ninja implementation is stronger.

see:
https://github.com/martine/ninja/blob/master/src/util.cc#L303

No, just unnecessarily complex:
- The BSDs implement sysconf(_SC_NPROCESSORS_ONLN) in terms of
sysctl({CTL_HW, HW_NCPU}), and at least FreeBSD attempts to use ELF aux
info if available.
- glibc implements sysconf(_SC_NPROCESSORS_ONLN) in terms of
get_nprocs(). And the #if defined(linux) is broken, because get_nprocs()
is a glibc extension and has nothing to do with Linux.
So basically we have 20 fewer lines, for exactly the same result.

https://codereview.chromium.org/23655004/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to