{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/10539","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/10539/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/10539/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/10539/events","html_url":"https://github.com/JuliaLang/julia/issues/10539","id":62318583,"number":10539,"title":"[ASK] Julia arithmatic operations not fast?","user":{"login":"kokizzu","id":1061610,"avatar_url":"https://avatars.githubusercontent.com/u/1061610?v=3","gravatar_id":"","url":"https://api.github.com/users/kokizzu","html_url":"https://github.com/kokizzu","followers_url":"https://api.github.com/users/kokizzu/followers","following_url":"https://api.github.com/users/kokizzu/following{/other_user}","gists_url":"https://api.github.com/users/kokizzu/gists{/gist_id}","starred_url":"https://api.github.com/users/kokizzu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kokizzu/subscriptions","organizations_url":"https://api.github.com/users/kokizzu/orgs","repos_url":"https://api.github.com/users/kokizzu/repos","events_url":"https://api.github.com/users/kokizzu/events{/privacy}","received_events_url":"https://api.github.com/users/kokizzu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-17T07:31:11Z","updated_at":"2015-03-18T13:46:34Z","closed_at":"2015-03-17T07:42:56Z","body":"I'm trying to make a program that print every 100K-th odd prime number until 10M for benchmark reasons.\r\n\r\n```\r\nres = [last=3]\r\nwhile true\r\n   last += 2\r\n   prime = true\r\n   for v in res\r\n     if v*v > last \r\n       break\r\n     end\r\n     if last % v == 0 \r\n       prime = false \r\n       break\r\n     end\r\n   end\r\n   if prime\r\n     push!(res,last)\r\n     if length(res) % 100000 == 0 \r\n       println(last)\r\n     end \r\n     if last > 9999999 \r\n       break\r\n     end\r\n   end\r\nend\r\n```\r\n\r\nBut Julia `0.3.6` didn't perform as fast as any other JIT/compiled language [implementations](http://kokizzu.blogspot.com/2015/03/prime-number-generator-benchmark.html)."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/82978732","html_url":"https://github.com/JuliaLang/julia/issues/10539#issuecomment-82978732","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/10539","id":82978732,"user":{"login":"andreasnoack","id":505001,"avatar_url":"https://avatars.githubusercontent.com/u/505001?v=3","gravatar_id":"","url":"https://api.github.com/users/andreasnoack","html_url":"https://github.com/andreasnoack","followers_url":"https://api.github.com/users/andreasnoack/followers","following_url":"https://api.github.com/users/andreasnoack/following{/other_user}","gists_url":"https://api.github.com/users/andreasnoack/gists{/gist_id}","starred_url":"https://api.github.com/users/andreasnoack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreasnoack/subscriptions","organizations_url":"https://api.github.com/users/andreasnoack/orgs","repos_url":"https://api.github.com/users/andreasnoack/repos","events_url":"https://api.github.com/users/andreasnoack/events{/privacy}","received_events_url":"https://api.github.com/users/andreasnoack/received_events","type":"User","site_admin":false},"created_at":"2015-03-18T13:46:34Z","updated_at":"2015-03-18T13:46:34Z","body":"I didn't know that trick. Then it will stay the same even when the source changes?"}}