Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2005-10-13 10:38:29


"Jose" <jmalv04_at_[hidden]> wrote

> The list below is up to date and has 20K+ coordinates that show the
location
> of IP Autonomous Systems (basically major ISPs).
>
> http://netgeo.caida.org/aslatlong.txt
>
> One query idea that comes to my mind is sorting the AS locations by the
> number of other AS that are in a 5 Km radius and limiting this to the top
> 500. That would give a "rough" idea of which locations in the world that
> have the highest IP connectivity. The name, so that is understandable,
> should be something like "CEDEL-MRS, LONDON, GB" (example taken from
> concatenating fields for CEDEL-MRS AS name).

Here is the RTL solution (please find it attached).

The result on my PC (1.5GHz, VC71, release mode, no optimization), for the
query only, is 28 sec. G++ does a much poorer job this time, even with the
optimization -- 64 sec.

I had to fix some performance issues, so please download the latest version
of RTL from the file vault:

http://www.boost-consulting.com/vault/index.php?&direction=0&order=&director
y=RTL

> This file changes regularly, as the net topology changes, so a second
query
> would be the time it takes, having the current file in memory, to read the
> updated file and run the updated query (and maybe show the list of
locations
> that have gained the most positions in the rank list)

This is to follow.

Regards,
Arkadiy

begin 666 main.cpp
M(VEN8VQU9&4@/&-T:6UE/@T*(VEN8VQU9&4@/&EO<W1R96%M/@T*(VEN8VQU
M9&4@/&9S=')E86T^#0HC:6YC;'5D92 \8V%S<V5R=#X-"B-I;F-L=61E(#QS
M=')I;F<^#0HC:6YC;'5D92 \8VUA=&@^#0HC:6YC;'5D92 \:6]M86YI<#X-
M"B-I;F-L=61E(#QB;V]S="]T;VME;FEZ97(N:'!P/@T*(VEN8VQU9&4@/&)O
M;W-T+VQE>&EC86Q?8V%S="YH<' ^#0HC:6YC;'5D92 \8F]O<W0O='EP96]F
M+W1Y<&5O9BYH<' ^#0HC:6YC;'5D92 \=&%B;&4N:'!P/@T*(VEN8VQU9&4@
M/'5T:6QS+FAP<#X-"B-I;F-L=61E(#QR96YA;64N:'!P/@T*(VEN8VQU9&4@
M/')A;F=E7VIO:6XN:'!P/@T*(VEN8VQU9&4@/'-E;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6UB97)?83L-"G1Y
M<&5D968_at_86QI87,\;&%T:71U9&4L(&$^(&QA=&ET=61E7V$[#0IT>7!E9&5F
M(&%L:6%S/&QO;F=I='5D92P_at_83X@;&]N9VET=61E7V$[#0IT>7!E9&5F(&%L
M:6%S/&YA;64L(&$^(&YA;65?83L-"@T*+R\O+R\O+R\O+PT*#0IS=')U8W0@
M9&ES=&%N8V5?;&5S<U]T:&%N#0I[#0H@(" @9&ES=&%N8V5?;&5S<U]T:&%N
M*&1O=6)L92!D*2 Z(&1?*&0I('M]#0H-"B @("!T96UP;&%T92 \8VQA<W,@
M270^(&)O;VP@;W!E<F%T;W(H*2AC;VYS="!)="8@:70I(&-O;G-T#0H@(" @
M>PT*(" @(" @("!I9B H:71;;G5M8F5R*"E=(#T](&ET6VYU;6)E<E]A*"E=
M*0T*(" @(" @(" @(" @<F5T=7)N(&9A;'-E.PT*#0H@(" @(" @($5A<G1H
M0V]O<F0_at_96,Q*&ET6VQA=&ET=61E*"E=+"!I=%ML;VYG:71U9&4H*5TI.PT*
M(" @(" @("!%87)T:$-O;W)D(&5C,BAI=%ML871I='5D95]A*"E=+"!I=%ML
M;VYG:71U9&5?82_at_I72D[#0H@(" @(" @(')E='5R;B!E8S$N9&ES=&%N8V4H
M96,R*2 \(&1?.PT*(" @('T@(" @(" @(" @( T*(" @(&1O=6)L92!D7SL-
M"GT[#0H-"B\O+R\O+R\O+R\-"@T*8VQA<W,@9FEN9%]L871I='5D95]A=%]D
M:7-T86YC90T*>PT*<'5B;&EC._at_T*(" @(&9I;F1?;&%T:71U9&5?871?9&ES
M=&%N8V4H9&]U8FQE(&0I#0H@(" @(" @(#H_at_9%\H9" J('!I("\@,C P,# I
M#0H@(" @>WT-"@ET96UP;&%T93QC;&%S<R!)="P_at_8VQA<W,@5&%B;&4^#0H)
M"71Y<&5N86UE(%1A8FQE.CIC;VYS=%]I=&5R871O<B!O<&5R871O<B_at_I*&-O
M;G-T($ET)B!I="P_at_8V]N<W0_at_5&%B;&4F('0I(&-O;G-T#0H)>PT*(" @(" @
M("!R;W<\;7!L.CIV96-T;W(Q/&QA=&ET=61E7V$^(#X@<W5B*&ET6VQA=&ET
M=61E*"E=("L_at_9%\I.PT*"0ER971U<FX@="YL;W=E<E]B;W5N9"AS=6(I.PT*
M"7T-"G!R:79A=&4Z#0H@(" @9&]U8FQE(&1?.PT*?3L-"@T*+R\O+R\O+R\O
M+PT*#0IT96UP;&%T93QC;&%S<R!4/@T*=F]I9"!L;V%D7W1A8FQE*%0F('0L
M(&ES=')E86TF(&EN*0T*>PT*(" @(&EN="!C;G0@/2 P.PT*#0H@(" @=VAI
M;&4@*"%I;BYE;V8H*2D-"B @("![#0H@(" @(" @('1R>0T*(" @(" @("![
M#0H@(" @(" @(" @("!S=')I;F<@;&EN93L-"B @(" @(" @(" @(&=E=&QI
M;F4H:6XL(&QI;F4I.PT*#0H@(" @(" @(" @("!I9B H;&EN95LP72 ]/2 G
M(R<@?'P@;&EN92YE;7!T>2_at_I*0T*(" @(" @(" @(" @(" @(&-O;G1I;G5E
M.PT*#0H@(" @(" @(" @("!M>71U<&QE('1P.PT*#0H@(" @(" @(" @("!T
M;VME;FEZ97(\8VAA<E]S97!A<F%T;W(\8VAA<CX@/B!T;VME;G,H;&EN92P@
M8VAA<E]S97!A<F%T;W(\8VAA<CXH(EQT(BDI.PT*(" @(" @(" @(" @=&]K
M96YI>F5R/&-H87)?<V5P87)A=&]R/&-H87(^(#XZ.FET97)A=&]R(&ET(#T@
M=&]K96YS+F)E9VEN*"D[#0H@(" @(" @(" @("!T<%MN=6UB97(H*5T@/2!L
M97AI8V%L7V-A<W0\:6YT/B_at_J:70K*RD[#0H@(" @(" @(" @("!T<%ML871I
M='5D92_at_I72 ](&QE>&EC86Q?8V%S=#QD;W5B;&4^*"II="LK*3L-"B @(" @
M(" @(" @('1P6VQO;F=I='5D92_at_I72 ](&QE>&EC86Q?8V%S=#QD;W5B;&4^
M*"II="LK*3L-"B @(" @(" @(" @('1P6VYA;64H*5T@/2 J:70K*SL-"B @
M(" @(" @(" @('1P6V-I='DH*5T@/2 J:70K*SL-"B @(" @(" @(" @('1P
M6W-T871E*"E=(#T@*FET*RL[#0H@(" @(" @(" @("!T<%MC;W5N=')Y*"E=
M(#T@*FET*RL[#0H@(" @(" @(" @("!T<%MI<V]?8V]U;G1R>2_at_I72 ]("II
M="LK.PT*(" @(" @(" @(" @='!;8V]N=&EN96YT*"E=(#T@*FET*RL[#0H@
M(" @(" @(" @(" -"B @(" @(" @(" @('0N:6YS97)T*'1P*3L-"@T*(" @
M(" @(" @(" @+R]I9B H*RMC;G0@/3T_at_-3 P*2 -"B @(" @(" @(" @("\O
M(" @(&)R96%K.PT*(" @(" @("!]#0H@(" @(" @(&-A=&-H("AC;VYS="!B
M861?;&5X:6-A;%]C87-T)B!E*0T*(" @(" @("![#0H@(" @(" @(" @("!C
M;W5T(#P\(&4N=VAA="@I(#P\(&5N9&P[#0H@(" @(" @('T-"B @("!]#0I]
M#0H-"B\O+R\O+R\O+R\-"@T*;6%I;B_at_I#0I[#0H@(" @:69S=')E86T@:6XH
M(F%S;&%T;&]N9RYT>'0B*3L-"B @("!A<W-E<G0H:6XN:7-?;W!E;B_at_I*3L-
M"@T*(" @(&UY=&%B;&4@=#L-"B @("!L;V%D7W1A8FQE*'0L(&EN*3L-"@T*
M(" @(&-O=70@/#P_at_8V]U;G0H="D@/#P@(B!R96-O<F1S(&QO861E9"(@/#P@
M96YD;#L-"@T*(" @(&-L;V-K7W0@=# @/2!C;&]C:R_at_[hidden]*#0H@(" @+R\@
M:6YD97@@=&AE('1A8FQE(&]N(&QA=&ET=61E#0H@(" @0D]/4U1?05543RAT
M7V)Y7VQA="P-"B @(" @(" @*&ME>5]I;F1E>#QM<&PZ.G9E8W1O<C(\;&%T
M:71U9&5?82P@;G5M8F5R7V$^(#XH875T;U]R96YA;64\83XH="DI*0T*(" @
M(" @(" I.PT*#0H@(" @+R\@<V5L9BUJ;VEN('1H92!T86)L92!R96UO=FEN
M9R!P86ER<R!T:&%T(&%R92!?;V)V:6]U<VQY7R!F87)T:&5R(&%W87D@=&AA
M;B U(&MM#0H@(" @0D]/4U1?05543RAR:BP-"B @(" @(" @<F%N9V5?:F]I
M;BAT+"!T7V)Y7VQA="P_at_9FEN9%]L871I='5D95]A=%]D:7-T86YC92_at_M-2DL
M(&9I;F1?;&%T:71U9&5?871?9&ES=&%N8V4H-2DI#0H@(" @(" @("D[#0H-
M"B @(" O+R!D;R!T:&4@<')O<&5R('-E;&5C=&EO;@T*(" @($)/3U-47T%5
M5$\H<V5L+" -"B @(" @(" @<V5L96-T:6]N*')J+"!D:7-T86YC95]L97-S
M7W1H86XH-2DI#0H@(" @(" @("D[#0H-"B @(" O+R!G970@=&AE(&YU;6)E
M<B!O9B!!4W,-"B @("!"3T]35%]!551/*&=B>2P-"B @(" @(" @*&=R;W5P
M8GD\,2P@;7!L.CIV96-T;W(Q/&-O=6YT97(^(#XH<V5L*2D-"B @(" @(" @
M*3L-"@T*(" @("\O('-O<G0@;VX@;G5M8F5R(&]F($%3<PT*(" @($)/3U-4
M7T%55$\H:61X+ T*(" @(" @(" H:V5Y7VEN9&5X/&UP;#HZ=F5C=&]R,CQC
M;W5N=&5R+"!N=6UB97(^(#XH9V)Y*2D-"B @(" @(" @*3L-"@T*(" @("\O
M(&%D9"!B86-K('1H92!!4R!N86UE( T*(" @($)/3U-47T%55$\H<F5S=6QT
M+ T*(" @(" @("!E<75A;%]J;VEN/&UP;#HZ=F5C=&]R,3QN=6UB97(^(#XH
M:61X+"!A=71O7W)E;F%M93QA/BAT*2D-"B @(" @(" @*3L-"@T*(" @("\O
M(&=E="!L87-T(#4P, T*(" @($)/3U-47T%55$\H8F5G:6XL(')E<W5L="YB
M96=I;B_at_I*3L-"B @("!I;G0_at_8VYT(#T_at_-3 P.PT*#0H@(" @9F]R("A"3T]3
M5%]!551/*&ET+"!R97-U;'0N96YD*"DI.R M+6ET("$](&)E9VEN("8F(&-N
M="TM("$](# [("D-"B @("![#0H@(" @(" @(&-O=70@/#P@:71;;G5M8F5R
M*"E=(#P\("=<="<[#0H@(" @(" @(&-O=70@/#P@<V5T=R_at_U,"D@/#P@:71;
M;F%M95]A*"E=(#P\("=<="<[#0H@(" @(" @(&-O=70@/#P@:71;8V]U;G1E
M<B_at_I72 \/" G7'0G.PT*(" @(" @("!C;W5T(#P\(&5N9&P[#0H@(" @?0T*
M#0H@(" @8VQO8VM?="!T,2 ](&-L;V-K*"D[#0H@(" @8V]U=" \/" B5&AE
M('%U97)Y('1O;VL@(B \/" H=#$M=# I+T-,3T-+4U]015)?4T5#(#P\("(@
C<V5C(B \/"!E;F1L.PT*#0H@(" @<F5T=7)N(# [#0I]#0H`
`
end


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk