Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
heydenberk
on March 12, 2014
|
parent
|
context
|
favorite
| on:
Python vs Julia – an example from machine learning
This Python code is "as expressive" as the Julia code because it's not written in idiomatic Python. Por ejemplo:
for i in range(n): solution[i] = y[i]
when one could simply
solution[:n] = y[:n]
Don't mean to bikeshed, but this is one of many cases.
ajtulloch
on March 13, 2014
[–]
FWIW, benchmarks indicated that the former was faster than the latter. Remember, this is Cython, so the goal is to write code that is easily compiled into efficient C code, not to write idiomatic Python.
Consider applying for YC's Spring batch! Applications are open till Feb 11.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: