{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "  0.005905 seconds (1.38 k allocations: 74.435 KiB)\n",
      "5\n",
      "  0.004712 seconds (5 allocations: 176 bytes)\n",
      "5000000\n"
     ]
    }
   ],
   "source": [
    "function test( n::Int64 )\n",
    "    total = 0\n",
    "\n",
    "    for i in 1:n\n",
    "        if i % 2 == 0\n",
    "            total += 1\n",
    "        end\n",
    "    end\n",
    "\n",
    "    return total\n",
    "end\n",
    "\n",
    "@time result = test( 10 )\n",
    "println( result )\n",
    "\n",
    "@time result = test( 10000000 )\n",
    "println( result )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Julia 0.6.2",
   "language": "julia",
   "name": "julia-0.6"
  },
  "language_info": {
   "file_extension": ".jl",
   "mimetype": "application/julia",
   "name": "julia",
   "version": "0.6.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
