πŸ”­
Ellery's study archive
Resume(μˆ˜μ •μ€‘)GithubTistory
  • framework, library
    • Spring core
      • μŠ€ν”„λ§ νŠΈλΌμ΄μ•΅κΈ€ - POJO, IOC/DI, AOP, PSA
      • Servlet
    • Spring MVC
      • DispatcherServlet
      • Validation
    • Spring Boot
    • Spring Security
    • Spring Batch
    • Spring Webflux
    • JPA
    • JUnit, Spring Test
    • etc
      • Slf4j MDC(Mapped Diagnostic Context)
  • ETC, 개발 νŒλ“€
    • 개발 νŒλ“€
      • μŠ€ν”„λ§ ν”„λ‘œμ νŠΈ init μ‹œμ— 해야될 것듀
      • vim ν•œκΈ€ 깨질 λ•Œ 인코딩 방식 μ§€μ •
      • EC2 ssh connection μ‰½κ²Œ ν•˜κΈ°
      • λ¦¬λˆ…μŠ€ μ»€λ§¨λ“œ, netstats
      • Forkν•œ λ ˆν¬μ§€ν† λ¦¬ origin μ—…λ°μ΄νŠΈ
      • git merge, rebase
      • Intellij 자주 μ“°λŠ” κΈ°λŠ₯ 단좕킀
      • JSON handling
      • aws user-data.sh
    • Lombok annotation, ꢌμž₯ 방식
    • DB λͺ¨λΈλ§ μ‹œμ— 인쑰 μ‹λ³„μž μ •μ˜ν•˜λŠ” μΌ€μ΄μŠ€
    • Redis pub/sub vs Apache kafka
  • Language
    • Java
      • μžλ°” 버젼별 feature
      • JVM architecture
      • Garbage collection
      • Java String pool
      • java 8 Concurrent
      • Optional
      • Stream
      • Comparator, Comparator
      • Error, Exception
      • Java의 Call by value(pass by value)
      • Java λ³€μˆ˜ κ°„ κ°’ Swap 방식 5κ°€μ§€
    • Javascript
      • 자주 μ“°λŠ” ES6 문법 정리
      • ES6 module
      • ES6 proxy
      • scope, var closure 이슈, let, const
    • Python
      • @lru_cache
  • CS
    • OS
      • Process, Thread
      • CPU scheduling
      • sync vs async, blocking vs nonblocking
      • Memory segmentation
      • virtual memory
      • νŽ˜μ΄μ§€ ꡐ체 μ•Œκ³ λ¦¬μ¦˜
    • Network
      • UDP
      • TCP
      • DNS
      • HTTP
      • web server, WAS
      • Proxy, Load balancer
      • web socket, WebRTC
      • gRPC
      • web secure
    • DB
      • MySQL
      • index
      • μ •κ·œν™”
      • DB νŠΈλžœμž­μ…˜, λ™μ‹œμ„± μ œμ–΄ 문제
      • ν΄λŸ¬μŠ€ν„°λ§
      • λ ˆν”Œλ¦¬μΌ€μ΄μ…˜
      • 샀딩
    • Data Structure, Algorithm
      • AVL tree, Red black tree
      • B-tree, B*tree, B+tree
      • Hash
    • Design pattern
      • SOLID
      • 생성 νŒ¨ν„΄
        • 싱글톀 νŒ¨ν„΄
        • νŒ©ν† λ¦¬ λ©”μ„œλ“œ νŒ¨ν„΄
        • λΉŒλ” νŒ¨ν„΄
        • Null 객체 νŒ¨ν„΄
      • ꡬ쑰 νŒ¨ν„΄
        • νΌμ‚¬λ“œ νŒ¨ν„΄
        • ν”„λ‘μ‹œ νŒ¨ν„΄
        • μ–΄λŒ‘ν„° νŒ¨ν„΄
        • λ°μ½”λ ˆμ΄ν„° νŒ¨ν„΄
      • ν–‰μœ„ νŒ¨ν„΄
        • μ „λž΅ νŒ¨ν„΄
        • ν…œν”Œλ¦Ώ λ©”μ„œλ“œ νŒ¨ν„΄
        • μƒνƒœ νŒ¨ν„΄
        • μ˜΅μ €λ²„ νŒ¨ν„΄
  • μ†Œν”„νŠΈμ›¨μ–΄ 아킀텍쳐
    • Layered Architecture
    • 클린 아킀텍쳐
    • DDD
    • etc
      • DTO vs VO
  • 개발 μ„œμ λ“€
    • μ†ŒνŠΈμ›μŠ€ μ•€μ†”λ‘œμ§€μ—μ„œ μ†Œκ°œλ˜λŠ” 객체지ν–₯ μƒν™œ 체쑰 원칙 κ°„λž΅ 정리
    • μ—˜λ ˆκ°•νŠΈ 였브젝트 - μƒˆλ‘œμš΄ κ΄€μ μ—μ„œ 바라본 객체지ν–₯
    • λ§Œλ“€λ©΄μ„œ λ°°μš°λŠ” 클린 아킀텍쳐
  • ν…Œν¬ λΈ”λ‘œκ·Έ
Powered by GitBook
On this page
Edit on GitHub
  1. Language
  2. Python

@lru_cache

  • lru_cache - ν•¨μˆ˜μ˜ λ°˜ν™˜κ°’μ„ κΈ°μ–΅ν•΄μ€Œ. lru_cacheλŠ” λ°μ½”λ ˆμ΄ν„°λ‘œ μ‚¬μš©λ˜λŠ”λ°, μ›ν•˜λŠ” ν•¨μˆ˜μ— 이 λ°μ½”λ ˆμ΄ν„°λ₯Ό 달아 μ£Όλ©΄ λ°˜ν™˜κ°’μ„ μ•Œμ•„μ„œ μ €μž₯ν•΄μ€€λ‹€.

from functools import lru_cache

@lru_cache(maxsize=None)
def fibo(n):
    if n < 2:
        return n
    return fibo(n - 1) + fibo(n - 2)

print(fibo(int(input())))
PreviousPythonNextOS

Last updated 2 years ago