You are on page 1of 2

Montserrat Gaytn Gutirrez A00569562

1.Investigue cmo se usan las funciones rand () y time() y modifique el programa visto en clase
para que al final muestre el mensaje: "Benchmark: xx.x megaFLOPS" Donde xx.x es el valor del
rendimiento calculado por el mismo programa y redondeado a 1 decimal.
Corra el benchmark para cada una de las siguientes funciones:
x=1, x=1+1, x=2*3, x=1/pi, x=rand(), x=sqrt(n), x=exp(e*rand()), x=sin(pi*rand()),
x=factorial(170.0*rand())

Entregue cdigo fuente y resultados


julia> T=time();for n=1:5e8 x=1 end; elapsed=time()-T; M=round(500/elapsed ,1); println("Time elapsed:
$elapsed"); println("Benchmark: $M megaFLOPS")
Time elapsed: 2.0425260066986084
Benchmark: 244.8 megaFLOPS
julia> T=time();for n=1:5e8 x=1+1 end; elapsed=time()-T; M=round(500/elapsed ,1); println("Time
elapsed: $elapsed"); println("Benchmark: $M megaFLOPS")
Time elapsed: 3.6374688148498535
Benchmark: 137.5 megaFLOPS
julia> T=time();for n=1:5e8 x=2*3 end; elapsed=time()-T; M=round(500/elapsed ,1); println("Time
elapsed: $elapsed"); println("Benchmark: $M megaFLOPS")
Time elapsed: 3.380977153778076
Benchmark: 147.9 megaFLOPS
julia> T=time();for n=1:5e8 x=1/pi end; elapsed=time()-T; M=round(500/elapsed ,1); println("Time
elapsed: $elapsed"); println("Benchmark: $M megaFLOPS")
Time elapsed: 4.888708114624023
Benchmark: 102.3 megaFLOPS
julia> T=time();for n=1:5e8 x=rand() end; elapsed=time()-T; M=round(500/elapsed ,1); println("Time
elapsed: $elapsed"); println("Benchmark: $M megaFLOPS")
Time elapsed: 7.442173957824707
Benchmark: 67.2 megaFLOPS
julia> T=time();for n=1:5e8 x=sqrt(n) end; elapsed=time()-T; M=round(500/elapsed ,1); println("Time
elapsed: $elapsed"); println("Benchmark: $M megaFLOPS")
Time elapsed: 7.250779867172241
Benchmark: 69.0 megaFLOPS
julia> T=time();for n=1:5e8 x=exp(e*rand()) end; elapsed=time()-T; M=round(500/elapsed ,1);
println("Time elapsed: $elapsed"); println("Benchmark: $M megaFLOPS")
Time elapsed: 17.76686120033264
Benchmark: 28.1 megaFLOPS
julia> T=time();for n=1:5e8 x=sin(pi*rand()) end; elapsed=time()-T; M=round(500/elapsed ,1);
println("Time elapsed: $elapsed"); println("Benchmark: $M megaFLOPS")
Time elapsed: 16.300647020339966
Benchmark: 30.7 megaFLOPS
julia> T=time();for n=1:5e8 x=factorial(170.0*rand()) end; elapsed=time()-T; M=round(500/elapsed ,1);
println("Time elapsed: $elapsed"); println("Benchmark: $M megaFLOPS")
Time elapsed: 57.05884099006653
Benchmark: 8.8 megaFLOPS
Montserrat Gaytn Gutirrez A00569562

Ecuacin Tiempo (segundos) MegaFLOPS


x=1 2.0425260066986084 244.8
x=1+1 3.6374688148498535 137.5
x=2*3 3.380977153778076 147.9
x=1/pi 4.888708114624023 102.3
x= rand() 7.442173957824707 67.2
X=sqrt(n) 7.250779867172241 69.0
x=exp(e*rand()) 17.76686120033264 28.1
x=sin(pi*rand()) 16.300647020339966 30.7
x=factorial(170.0*rand()) 57.05884099006653 8.8

2. El lmite de Bremermann es la velocidad mxima de cmputo que tericamente puede alcanzar


un sistema auto contenido en el universo material y su valor es: 1.3564e50 bits/s/kg.
Hasta cuantos bits llegara a contar una computadora del tamao de la tierra durante la edad que
tiene la misma operando al lmite de Bremermann?
H. Bremermann demostr en 1962 que "ningn sistema de procesamiento de datos, ya sea
artificial o vivo, puede procesar ms de 2 x 1047 bits por segundo por gramo de su masa", lo que
significa que un superordenador hipottico del tamao de la tierra (6 x 1027 gramos) por el tiempo
que la tierra ha existido puede haber procesado a lo ms 2.56 x 2092 pedacitos, cuyo nmero se
conoce como Lmite de Bremermann.
Los clculos que involucran nmeros mayores de 2,56 x 2092 se llaman problemas
transcomputacionales, lo que significa que ni siquiera son tericamente factibles.

REFERENCIAS
https://rogercostello.wordpress.com/2007/10/02/the-ultimate-limits-of-computing-a-computer-
the-size-of-earth/

You might also like